当前位置: 首页>>代码示例>>C++>>正文


C++ dotest函数代码示例

本文整理汇总了C++中dotest函数的典型用法代码示例。如果您正苦于以下问题:C++ dotest函数的具体用法?C++ dotest怎么用?C++ dotest使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了dotest函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: main

int main(void)
{
int i;
unsigned long l;

    printf("\nwithout cast:\n");

    printf("return int\n");

    dotest(i,test1_int_char(),0x76);
    dotest(i,test1_int_int(),0x5678);

    printf("return long\n");

    dotest(l,test1_long_char(),0x76);
    dotest(l,test1_long_int(),0x5678);
    dotest(l,test1_long_long(),0x12345678);

   printf("\nwith cast:\n");

   printf("return int\n");

    dotest(i,test2_int_char(),0x76);
    dotest(i,test2_int_int(),0x5678);

    printf("return long\n");

    dotest(l,test2_long_char(),0x76);
    dotest(l,test2_long_int(),0x5678);
    dotest(l,test2_long_long(),0x12345678);

    return 0;
}
开发者ID:Aliandrana,项目名称:cc65,代码行数:33,代码来源:return.c

示例2: main

int
main(int argc, char *argv[])
{
	int i, tn, menu=1;

	if (argc > 1) {
		for (i=1; i<argc; i++) {
			dotest(atoi(argv[i]));
		}
		return 0;
	}

	while (1) {
		if (menu) {
			for (i=0; tests[i].num>=0; i++) {
				printf("  %2d  %s\n", tests[i].num, 
				       tests[i].desc);
			}
			menu = 0;
		}
		printf("malloctest: ");
		tn = geti();
		if (tn < 0) {
			break;
		}

		if (dotest(tn)) {
			menu = 1;
		}
	}

	return 0;
}
开发者ID:1337codeMonkey,项目名称:OS-NNN,代码行数:33,代码来源:malloctest.c

示例3: main

int main ()
{
	dotest (test1);
	dotest (test2);
	printf ("All attempts failed\n");
	return 0;
}
开发者ID:AlexanderS,项目名称:util-vserver,代码行数:7,代码来源:escaperoot.c

示例4: main

/* main ===================================================================== */
int
main (void) {
  vSerialInit (SERIAL_BAUDRATE / 100, SERIAL_IOS);
  stdout = &xSerialPort;
  dprintf("Memory Debug Test\n");

  dotest (false);
  dotest (true);

  return 0;
}
开发者ID:epsilonrt,项目名称:avrio,代码行数:12,代码来源:test_memdebug.c

示例5: main

int
main()
{
	setup();

	/* Do the whole thing twice */
	dotest();
	dotest();

	cleanup();
	return 0;
}
开发者ID:ShaoyuC,项目名称:OS161,代码行数:12,代码来源:dirseek.c

示例6: main

int
main(void)
{

#if defined(HAVE_LIBPNG)
	dotest ("times", 16, 20.0, 400, 400, "Hello, there!",
	        "fontwheeltest1.png");
	dotest ("times", 16, 30.0, 400, 400, "Hello, there!",
	        "fontwheeltest2.png");
	dotest ("arial", 16, 45.0, 400, 400, "Hello, there!",
	        "fontwheeltest3.png");
	dotest ("arial", 16, 90.0, 400, 400, "Hello\nthere!",
	        "fontwheeltest4.png");
#elif defined(HAVE_LIBJPEG)
	dotest ("times", 16, 20.0, 400, 400, "Hello, there!",
	        "fontwheeltest1.jpeg");
	dotest ("times", 16, 30.0, 400, 400, "Hello, there!",
	        "fontwheeltest2.jpeg");
	dotest ("arial", 16, 45.0, 400, 400, "Hello, there!",
	        "fontwheeltest3.jpeg");
	dotest ("arial", 16, 90.0, 400, 400, "Hello\nthere!",
	        "fontwheeltest4.jpeg");
#else
	fprintf(stderr, "no PNG or JPEG support\n");
#endif

	return 0;
}
开发者ID:AaronNGray,项目名称:texlive-libs,代码行数:28,代码来源:fontwheeltest.c

示例7: main

int
main(void)
{
    plan_tests(5);
    setvbuf(stdout, 0, _IOLBF, 0);
    int pts[] = { 1,3, 2,5, 4,0, 8,9, 5,20, 6,23, 10,10, 10,11, 10,12, 15,22, 13,23, -1 };
    
    dotest( 8,  8, pts);
    dotest( 8, 24, pts);
    dotest(16, 16, pts);
    dotest(16, 24, pts);
    dotest(24, 24, pts);
 
    return exit_status();
}
开发者ID:ctSkennerton,项目名称:util,代码行数:15,代码来源:bitmat_t.c

示例8: main

int main(int argc, char **argv) {
  const char *arg;
  while ((arg= *++argv)) {
    dotest(arg);
  }
  return !!fails;
}
开发者ID:kbandla,项目名称:adns,代码行数:7,代码来源:addrtext.c

示例9: main

int
main(void)
{
	init();
	dotest();
	return 0;
}
开发者ID:bizentass,项目名称:OS161,代码行数:7,代码来源:bigfork.c

示例10: mantest

// Test the @perm:utation and the inverse thereof of @managedWindows.
static unsigned mantest(QVector<unsigned> const &perm,
                        const WindowVec *fromStack,
                        const MRestacker *fromState)
{
    MRestacker::WindowStack stack;

    foreach (unsigned i, perm)
        stack.append(managedWindows[i]);
    dotest(stack, fromStack, fromState);

    for (int i = 0; i < perm.count(); i++)
        stack[perm[i]] = managedWindows[i];
    dotest(stack, fromStack, fromState);

    return 2;
}
开发者ID:amtep,项目名称:mcompositor,代码行数:17,代码来源:ut_restackwindows.cpp

示例11: dotests

void dotests() {
    std::chrono::microseconds times[20];
    for(int i=0; i<20; ++i) 
        times[i] = dotest();
    std::sort(begin(times), end(times));
    std::cout << "TestSet min: " << times[0].count() << "ms\n";
}
开发者ID:CCJY,项目名称:coliru,代码行数:7,代码来源:main.cpp

示例12: loadfile

void loadfile(const std::string& testfname)
{
  hdf5_collection col;
  col.load_collection(testfname);
  fprintf(stdout, "\n\n\n\n\n\n\n LOADED NOW!\n");
  dotest( col );
}
开发者ID:flyingfalling,项目名称:psweep2,代码行数:7,代码来源:test_hdf5collection.cpp

示例13: main

int main(int argc, const char **argv)
{
  
  SerialconfigIndication *deviceIndication = 0;

  fprintf(stderr, "%s %s\n", __DATE__, __TIME__);
  dev = new SerialconfigRequestProxy(IfcNames_SerialconfigRequest);

  deviceIndication = new SerialconfigIndication(IfcNames_SerialconfigIndication);

  if(sem_init(&test_sem, 1, 0)){
    fprintf(stderr, "failed to init test_sem\n");
    return -1;
  }

  pthread_t tid;
  fprintf(stderr, "creating exec thread\n");
  if(pthread_create(&tid, NULL,  portalExec, NULL)){
   fprintf(stderr, "error creating exec thread\n");
   exit(1);
  }

    fprintf(stderr, "simple tests\n");
    
    dotest();

  }
开发者ID:suhaspai,项目名称:xbsv,代码行数:27,代码来源:testserialconfig.cpp

示例14: runtest

static void runtest(void)
{
	int child, count, fd, i, nwait, status;

	nwait = 0;

	for (i = 0; i < nchild; i++) {

		if ((child = fork()) == 0) {
			fd = open(filename, O_RDWR);
			if (fd < 0) {
				tst_brkm(TFAIL,
					 NULL,
					 "\tTest[%d]: error %d openning %s.",
					 i,
					 errno, filename);
			}
			dotest(nchild, i, fd);
			close(fd);
			tst_exit();
		}

		if (child < 0) {
			tst_brkm(TBROK | TERRNO, NULL, "fork failed");
		} else {
			pidlist[i] = child;
			nwait++;
		}
	}

	/*
	 * Wait for children to finish.
	 */
	count = 0;
	while ((child = wait(&status)) != -1 || errno == EINTR) {
		if (child > 0) {
			//tst_resm(TINFO, "\tTest{%d} exited status = 0x%x", child, status);
			if (status) {
				tst_resm(TFAIL,
					 "\tExpected 0 exit status - failed.");
				local_flag = FAILED;
			}
			++count;
		}
	}

	/*
	 * Should have collected all children.
	 */
	if (count != nwait) {
		tst_resm(TFAIL, "\tWrong # children waited on, count = %d",
			 count);
		local_flag = FAILED;
	}

	unlink(filename);
	sync();
}
开发者ID:TimLand,项目名称:ltp,代码行数:58,代码来源:ftest08.c

示例15: mod_pagefaults

int mod_pagefaults(A_UNUSED int argc,A_UNUSED char *argv[]) {
	int i,fd = createfile();
	for(i = 0; i < TEST_COUNT; ++i)
		dotest(fd);
	close(fd);
	if(unlink("/sys/test") != 0)
		error("unlink failed");
	return EXIT_SUCCESS;
}
开发者ID:jarn0x,项目名称:Escape,代码行数:9,代码来源:pagefaults.c


注:本文中的dotest函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。