int main()
{
    test1();
    test2();
    test3();
    test4();
    test5();
    test6();
}
Exemple #2
0
int main ()
{
  test1 (0, 0);
  test1 (SCHAR_MAX, 0);
  test1 (SCHAR_MIN, 1);
  test1 (UCHAR_MAX, 1);

  test2 (0, 0);
  test2 (SCHAR_MAX, 0);
  test2 (SCHAR_MIN, 1);
  test2 (UCHAR_MAX, 1);

  test3 (0, 0);
  test3 (SHRT_MAX, 0);
  test3 (SHRT_MIN, 1);
  test3 (USHRT_MAX, 1);

  test4 (0, 0);
  test4 (SHRT_MAX, 0);
  test4 (SHRT_MIN, 1);
  test4 (USHRT_MAX, 1);

  test5 (0, 0);
  test5 (INT_MAX, 0);
  test5 (INT_MIN, 1);
  test5 (UINT_MAX, 1);

  test6 (0, 0);
  test6 (INT_MAX, 0);
  test6 (INT_MIN, 1);
  test6 (UINT_MAX, 1);

  test7 (0, 0);
  test7 (LONG_LONG_MAX, 0);
  test7 (LONG_LONG_MIN, 1);
  test7 (ULONG_LONG_MAX, 1);

  test8 (0, 0);
  test8 (LONG_LONG_MAX, 0);
  test8 (LONG_LONG_MIN, 1);
  test8 (ULONG_LONG_MAX, 1);

  return 0;
}
Exemple #3
0
int main() 
{
    LockIndex1= CreateLock("Lock1", 5);
    Write("Lock 1 created\n", sizeof("Lock 1 created\n"), 1);
    LockIndex2 = CreateLock("Lock2", 5);
    Write("Lock 2 created\n", sizeof("Lock 2 created\n"), 1);
    LockIndex3 = CreateLock("Lock3", 5);
    Write("Lock 3 created\n", sizeof("Lock 3 created\n"), 1);
    LockIndex4 = CreateLock("Lock4", 5);
    Write("Lock 4 created\n", sizeof("Lock 4 created\n"), 1);
    CVIndex1 = CreateCV("CV1", 3);
    Write("CV 1 created\n", sizeof("CV 1 created\n"), 1);
    CVIndex2 = CreateCV("CV2", 3);
    Write("CV 2 created\n", sizeof("CV 2 created\n"), 1);
    CVIndex3 = CreateCV("CV3", 3);
    Write("CV 3 created\n", sizeof("CV 3 created\n"), 1);
    CVIndex4 = CreateCV("CV4", 3);
    Write("CV 4 created\n", sizeof("CV 4 created\n"), 1);

    /*BoundsErrorCheck_Test();
     passingVars_Test();*/

    test6();
    /*test2();
    


    /*test2();
    test3();
    test4();
    test5();*/
    /*test6();*/

/*
    int lock1;

    /*BoundsErrorCheck_Test();
    int lock1, lock2, lock3, lock4;
    lock1= CreateLock("abc", 3);
    /*lock2= CreateLock("def", 3);
    lock3= CreateLock("ghi", 3);
    lock4= CreateLock("jkl", 3);*/

    /*Fork("thread1", 7, unsigned int vFuncAddr);
    Fork("thread2", 7, unsigned int vFuncAddr);
    Fork("thread3", 7, unsigned int vFuncAddr);


     /*CreateLock_Test(); */
     /*Acquire_Test();*/
     /*Release_Test();*/
     /*DestroyLock_Test();*/


	/* Multiple threads test */
}
Exemple #4
0
int main()
{
	test1();
	test2(1);
	test3(1);
	test4(1);
	test5(1);
	test6(-1);
	return 0;
}
Exemple #5
0
void
all_tests (int x, int y)
{
  test1 (x, y);
  test2 (x, y);
  test3 (x, y);
  test4 (x, y);
  test5 (x, y);
  test6 (x, y);
}
Exemple #6
0
int main() {
    test1();
    test2();
    test3();
    test4();
    test5();
    test6();
    test7();
    return 0;
}
Exemple #7
0
PiSDFGraph* initPisdf_test6(Archi* archi, Stack* stack){
	PiSDFGraph* top = CREATE(stack, PiSDFGraph)(
			0,0,0,0,0,1, archi, stack);

	top->addHierVertex(
			"top", test6(archi, stack),
			0, 0, 0);

	return top;
}
Exemple #8
0
int main()
{
	//test1();
	//test2();
	//test3();
	//test4();
	//test5();
	test6();
	return 0;
}
void
testTortureExecute (void){
  test1 ();
  test2 ();
  test3 ();
  test4 ();
  test5 ();
  test6 ();
  return;
}
 void step()
  {
   test1();
   test2();
   test3();
   test4();
   test5();
   test6();
   test7();
  }
Exemple #11
0
void test(int a, int b)
{
  if (test2(a) != b)
    abort();
  if (test3(a) != b)
    abort();
  if (test5(a) != b)
    abort();
  if (test6(a) != b)
    abort();
}
int main(int agrc, char* argv[])
{
    test1();
    test2();
    test3();
    test4();
    test5();
    test6();
    test7();
    test8();
}
Exemple #13
0
void permunation(int n)
{
	strLen = n;
	test1();
	//test2();
	//test3();
	test4();
	//test5();
	test6();
	//testWay();
}
Exemple #14
0
void tst_model_based_opt() {
    check_random_ineqs();
    test1();
    test2();
    test3();
    test4();
    test5();
    test6();
    test7();

}
Exemple #15
0
int main(int, char**)
{
    test1();
    test2();
    test3();
    test4();
    test5();
    test6();

  return 0;
}
Exemple #16
0
void main(void)
{
    test1();
    //test2();

    test3();
	test4();
	test5();
	test6();
	test7();
	test8();
}
Exemple #17
0
int main() {

    test0("alloctest: static buffer test");
    test1("alloctest: memory limit test");
    test2("alloctest: alloc/alloc_free test");
    test3("alloctest: negative/zero alloc test");
    test4("alloctest: alloc_freall test");
    test5("alloctest: double free test");
    test6("alloctest: struct test");

    _exit(0);
}
Exemple #18
0
static void worker( void *arg )
{
    printf("Testing in tid = %d\n", _gettid());

    test1();
    test2();
    test3();
    test4();
    test5();
    test6();
    test7();
}
Exemple #19
0
int main() {
    fill_str_text();
    test1();
    test2();
    test3();
    test4();
    test5();
    test6();
    cout << "\n";
    cout.flush();
    return 0;
};
Exemple #20
0
int main()
{
	//test();
	//test2();
	//test3();
	//test4();
	//test5();
	test6();
	test7();
	test8();
	return 0;
}
Exemple #21
0
int 
test_main( int /* argc */, char* /* argv */[] )
{
    test1();
    test2();
    test3();
    test4();
    test5();
    test6();
    test7();
    test8();
    return EXIT_SUCCESS;
}
Exemple #22
0
int main( )
{
    test0();
    test1();
    test2();
    test3();
    test4();
    test5();
    test6();
    test7();
    test8();
    test9();
}
Exemple #23
0
/*
 * main test driver
 */
int main(int argc, char **argv)
{
	test1();
	test2();
	test3();
	test4();
	test5();
	test6();
	/*
	 * all done
	 */
	tst_exit();
}
Exemple #24
0
static PetscErrorCode test8(DM dm, AppCtx *options)
{
  PetscFE        fe;
  PetscErrorCode ierr;

  PetscFunctionBegin;
  ierr = PetscFECreateDefault(PetscObjectComm((PetscObject) dm), options->dim, 1, options->simplex, NULL, -1, &fe);CHKERRQ(ierr);
  ierr = DMSetField(dm, 0, NULL, (PetscObject)fe);CHKERRQ(ierr);
  ierr = PetscFEDestroy(&fe);CHKERRQ(ierr);
  ierr = DMCreateDS(dm);CHKERRQ(ierr);
  ierr = test6(dm, options);CHKERRQ(ierr);
  PetscFunctionReturn(0);
}
Exemple #25
0
void initWorldModelling(int testcase)
{
    /* create world */
    dRandSetSeed(1);
    dInitODE();
    //dInitODE2(dInitFlagManualThreadCleanup);
    //dAllocateODEDataForThread(dAllocateMaskAll);
    world = dWorldCreate();
    space = dHashSpaceCreate (0);

    //dWorldSetAutoDisableFlag(World, 1);

    // The parameter needs to be zero.
    contactgroup = dJointGroupCreate (0);
    dWorldSetGravity (world,0,-9.81f,0);
    dWorldSetCFM (world,1e-2f);   //1e-5f was the originally value used.
    dWorldSetERP(world,1.0f);   // 1 is Error Correction is applied.

    // Set Damping
    dWorldSetLinearDamping(world, 0.01f);  // 0.00001
    dWorldSetAngularDamping(world, 0.005f);     // 0.005
    dWorldSetMaxAngularSpeed(world, 200);

    // Set and get the depth of the surface layer around all geometry objects. Contacts are allowed to sink into the surface layer up to the given depth before coming to rest. The default value is zero. Increasing this to some small value (e.g. 0.001) can help prevent jittering problems due to contacts being repeatedly made and broken.
    dWorldSetContactSurfaceLayer (world,0.001f);

    ground = dCreatePlane (space,0,1,0,0);



    switch(testcase)
    {
    case 1:initIslands();test1();break;// Carrier stability
    case 2:initIslands();test1();test2();break;// Manta landing on island.
    case 3:initIslands();test1();test2();test3();break;// Manta crashing on structure
    case 4:initIslands();test1();test2();test3();test4();break;// Manta landing on runway
    case 5:initIslands();test1();test2();break;// Manta landing on aircraft
    case 6:initIslands();test1();test6();break;// Carrier stranded on island
    case 7:test1();test2();test7();break; //Manta crashing on water.
    case 8:initIslands();test1();test8();break; // Walrus reaching island.
    case 9:test1();test9();break; // Walrus stability.
    case 10:initIslands();test1();test10();break; // Walrus arrive to island and build the command center.
    case 11:initIslands();test11();break; // Carrier stability far away.
    case 12:initIslands();test1();test12();break; // Bullets
    case 13:initIslands();test13();break;
    default:initIslands();test1();break;
    }

    testing = testcase;

}
Exemple #26
0
int main(void)
{
	//acl_mem_slice_init(8, 1024, 1000000, ACL_SLICE_FLAG_GC2 | ACL_SLICE_FLAG_RTGC_OFF);

	acl::string buf;
	const char* sss = "hello world!";
	buf.format("max unsigned short: %30u\r\n", (unsigned short) -1);
	buf.format_append("max unsigned int: %30u\r\n", (unsigned int) -1);
	buf.format_append("max unsigned long long int: %30llu\r\n",
		(unsigned long long int) -1);
	buf.format_append("sss: %s, max unsigned int: %u", sss,
		(unsigned int) -1);
	printf(">>buf: %s\r\n", buf.c_str());
	printf("enter any key to continue\r\n");
	getchar();

	const char* s[] = { "a.b", "a.", ".b", ".", "ab", "abcd.txt", NULL };
	acl::string s1, s2, ss;
	for (size_t i = 0;  s[i] != NULL; i++)
	{
		ss = s[i];
		const char* p = strchr(ss.c_str(), '.');
		if (p)
		{
			printf("----------------------------------------------------\r\n");
			int n = (int) (p - ss.c_str());
			printf("string: |%s|, pos: %d\r\n", ss.c_str(), n);

			s1 = ss.left(n);
			printf("left: |%s|, len: %d\r\n", s1.c_str(), (int) s1.length());

			s2 = ss.right(n);
			printf("right: |%s|, len: %d\r\n", s2.c_str(), (int) s2.length());
		}
	}
	printf("enter any key to continue ...\r\n");
	getchar();

	test_main();

	test4();
	test5();
	test6();
	test7();

#ifdef WIN32
	printf("enter any key to exit\r\n");
	getchar();
#endif
	return (0);
}
Exemple #27
0
bool TestTaxBuilder::runTests()
{
    BUTT_PRE_TESTS();
    BUTT_RUN_TEST("TestTaxBuilder test 1", test1());
    BUTT_RUN_TEST("TestTaxBuilder test 2", test2());
    BUTT_RUN_TEST("TestTaxBuilder test 3", test3());
    BUTT_RUN_TEST("TestTaxBuilder test 4", test4());
    BUTT_RUN_TEST("TestTaxBuilder test 5", test5());
    BUTT_RUN_TEST("TestTaxBuilder test 6", test6());
    BUTT_RUN_TEST("TestTaxBuilder test 7", test7());
    BUTT_RUN_TEST("TestTaxBuilder test 8", test8());
    BUTT_POST_TESTS();

}
Exemple #28
0
int main(int argc, char* argv[])
{
    //TODO 在这里添加单元测试,越多越好,代码路径覆盖率越全越好

    test1();
    test2();
    test3();
    test4();
	test5();
	test6();
	test7();

    return 0;
}
Exemple #29
0
int
main(void)
{
	test1();
	test2();
	test3();
	test4();
	test5();
	test6();
	test7();

	tprintf("Whew... survived.\n");
	return 0;
}
Exemple #30
0
main()
{
    tct = 0;
    ect = 0;
    test1();
    test2();
    test3();
    test4();
    test5();
    test6();
    printf("End of test program, %d tests completed, %d errors detected\n",
	tct,ect);
	return 0 ;
}