예제 #1
0
int main(void)
{ 
    if( test(-1) != 1 ) fail( __LINE__ );
    if( test(0) != 1 ) fail( __LINE__ );
    if( test(1) != 1 ) fail( __LINE__ );
    if( u_test(-1) != 1 ) fail( __LINE__ );
    if( u_test(0) != 1 ) fail( __LINE__ );
    if( u_test(1) != 1 ) fail( __LINE__ );
    if( a_test(-2) != 1 ) fail( __LINE__ );
    if( a_test(-1) != 1 ) fail( __LINE__ );
    if( a_test(0) != 1 ) fail( __LINE__ );
    if( b_test(INT_MIN+1) != 1 ) fail( __LINE__ );
    if( b_test(INT_MIN) != 1 ) fail( __LINE__ );
    if( b_test(INT_MAX) != 1 ) fail( __LINE__ );
    if( c_test(INT_MAX-1) != 1 ) fail( __LINE__ );
    if( c_test(INT_MAX) != 1 ) fail( __LINE__ );
    if( c_test(INT_MIN) != 1 ) fail( __LINE__ );
    if( d_test(INT_MAX-1) != 1 ) fail( __LINE__ );
    if( d_test(INT_MAX) != 1 ) fail( __LINE__ );
    if( d_test(2) != 1 ) fail( __LINE__ );
    if( e_test(INT_MIN+1) != 1 ) fail( __LINE__ );
    if( e_test(INT_MIN) != 1 ) fail( __LINE__ );
    if( e_test(INT_MAX) != 1 ) fail( __LINE__ );
    if( f_test(INT_MAX-1) != 1 ) fail( __LINE__ );
    if( f_test(INT_MAX) != 1 ) fail( __LINE__ );
    if( f_test(INT_MIN) != 1 ) fail( __LINE__ );
    _PASS;
} 
// -----------------------------------------------------------------------------
// Cstlport_c_test::c_testL
// Example test method function.
// (other items were commented in a header).
// -----------------------------------------------------------------------------
//
TInt Cstlport_c_test::c_testL( CStifItemParser& /*aItem*/ )
    {

      int ret=0;
    ret = c_test(0, NULL);
    
     if(ret==0)
		return KErrNone;
	else	
		return KErrGeneral;

    }
    void c_test (int max){
        int i;
        for (f=1)
        
        
    }

#line 23 "ko_6_1_0_perllint_01cc.c"
#ifndef PERL_UNUSED_VAR
#  define PERL_UNUSED_VAR(var) if (0) var = var
#endif

#ifndef PERL_ARGS_ASSERT_CROAK_XS_USAGE
#define PERL_ARGS_ASSERT_CROAK_XS_USAGE assert(cv); assert(params)

/* prototype to pass -Wmissing-prototypes */
STATIC void
S_croak_xs_usage(pTHX_ const CV *const cv, const char *const params);

STATIC void
S_croak_xs_usage(pTHX_ const CV *const cv, const char *const params)
{
    const GV *const gv = CvGV(cv);

    PERL_ARGS_ASSERT_CROAK_XS_USAGE;

    if (gv) {
        const char *const gvname = GvNAME(gv);
        const HV *const stash = GvSTASH(gv);
        const char *const hvname = stash ? HvNAME(stash) : NULL;

        if (hvname)
            Perl_croak(aTHX_ "Usage: %s::%s(%s)", hvname, gvname, params);
        else
            Perl_croak(aTHX_ "Usage: %s(%s)", gvname, params);
    } else {
        /* Pants. I don't think that it should be possible to get here. */
        Perl_croak(aTHX_ "Usage: CODE(0x%"UVxf")(%s)", PTR2UV(cv), params);
    }
}
#undef  PERL_ARGS_ASSERT_CROAK_XS_USAGE

#ifdef PERL_IMPLICIT_CONTEXT
#define croak_xs_usage(a,b)	S_croak_xs_usage(aTHX_ a,b)
#else
#define croak_xs_usage		S_croak_xs_usage
#endif

#endif

/* NOTE: the prototype of newXSproto() is different in versions of perls,
 * so we define a portable version of newXSproto()
 */
#ifdef newXS_flags
#define newXSproto_portable(name, c_impl, file, proto) newXS_flags(name, c_impl, file, proto, 0)
#else
#define newXSproto_portable(name, c_impl, file, proto) (PL_Sv=(SV*)newXS(name, c_impl, file), sv_setpv(PL_Sv, proto), (CV*)PL_Sv)
#endif /* !defined(newXS_flags) */

#line 75 "ko_6_1_0_perllint_01cc.c"

XS(XS_main_c_test); /* prototype to pass -Wmissing-prototypes */
XS(XS_main_c_test)
{
#ifdef dVAR
    dVAR; dXSARGS;
#else
    dXSARGS;
#endif
    if (items != 1)
       croak_xs_usage(cv,  "max");
    PERL_UNUSED_VAR(ax); /* -Wall */
    SP -= items;
    {
	int	max = (int)SvIV(ST(0));
#line 22 "ko_6_1_0_perllint_01cc.xs"
	I32* temp;
#line 93 "ko_6_1_0_perllint_01cc.c"
#line 24 "ko_6_1_0_perllint_01cc.xs"
	temp = PL_markstack_ptr++;
	c_test(max);
	if (PL_markstack_ptr != temp) {
          /* truly void, because dXSARGS not invoked */
	  PL_markstack_ptr = temp;
	  XSRETURN_EMPTY; /* return empty stack */
        }
        /* must have used dXSARGS; list context implied */
	return; /* assume stack size is correct */
#line 104 "ko_6_1_0_perllint_01cc.c"
	PUTBACK;
	return;
    }
}

#ifdef __cplusplus
extern "C"
#endif
XS(boot_ko_6_1_0_perllint_01cc); /* prototype to pass -Wmissing-prototypes */
XS(boot_ko_6_1_0_perllint_01cc)
{
#ifdef dVAR
    dVAR; dXSARGS;
#else
    dXSARGS;
#endif
#if (PERL_REVISION == 5 && PERL_VERSION < 9)
    char* file = __FILE__;
#else
    const char* file = __FILE__;
#endif

    PERL_UNUSED_VAR(cv); /* -W */
    PERL_UNUSED_VAR(items); /* -W */
    XS_VERSION_BOOTCHECK ;

        newXS("main::c_test", XS_main_c_test, file);
#if (PERL_REVISION == 5 && PERL_VERSION >= 9)
  if (PL_unitcheckav)
       call_list(PL_scopestack_ix, PL_unitcheckav);
#endif
    XSRETURN_YES;
}