• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

C++ dotest函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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


示例16: rottest

// Test all rotations of the given @stack:ing.  When finished,
// @stack will be the same as when started.
static unsigned rottest(MRestacker::WindowStack &stack,
                        const WindowVec *fromStack,
                        const MRestacker *fromState)
{
    for (unsigned i = stack.count(); i > 0; i--) {
        dotest(stack, fromStack, fromState);
        stack.prepend(stack.takeLast());
    }
    return stack.count();
}
开发者ID:amtep,项目名称:mcompositor,代码行数:12,代码来源:ut_restackwindows.cpp


示例17: main

int
main(int argc, char *argv[])
{
	size_t newblocksize;
	int wss, cs, n = 0, p;

#define ITER 3
#define BLOCKS 200

	start(72);

	lmfs_setquiet(1);

	/* Can the cache handle differently sized blocks? */

	for(p = 1; p <= 3; p++) {
		/* Do not update curblocksize until the cache is flushed. */
		newblocksize = PAGE_SIZE*p;
		lmfs_set_blocksize(newblocksize);
		curblocksize = newblocksize;	/* now it's safe to update */
		lmfs_buf_pool(BLOCKS);
		if(dotest(curblocksize, BLOCKS, ITER)) e(n);
		n++;
	}
	
	/* Can the cache handle various combinations of the working set
	 * being larger and smaller than the cache?
	 */
	for(wss = 2; wss <= 3; wss++) {
		int wsblocks = 10*wss*wss*wss*wss*wss;
		for(cs = wsblocks/4; cs <= wsblocks*3; cs *= 1.5) {
			lmfs_set_blocksize(PAGE_SIZE);
			curblocksize = PAGE_SIZE;	/* same as above */
			lmfs_buf_pool(cs);
		        if(dotest(curblocksize, wsblocks, ITER)) e(n);
			n++;
		}
	}

	quit();

	return 0;
}
开发者ID:Stichting-MINIX-Research-Foundation,项目名称:minix,代码行数:43,代码来源:test72.c


示例18: main

int
main(int argc, char *argv[])
{
    char 	*progname = argv[0];
    char 	*fname;
    shrc 	rc;

    if(argc != 1){
	usage(cerr, progname);
    }

    // Establish a connection with the vas and initialize 
    // the object  cache.
    SH_DO(Shore::init(argc, argv));

    SH_BEGIN_TRANSACTION(rc);

    // If that failed, or if a transaction aborted...
    if(rc){
	// after longjmp
	cerr << rc << endl;
	return 1;
    } else {
	// The main body of the transaction goes here.

	SH_DO(Shore::chdir("/"));

	//////////////////////////////////
	// GUTS HERE
	//////////////////////////////////
	fname = "XXX";
	{
	    bool ok = true;

	    SH_DO( REF(my_obj)::new_persistent (fname, 0644, o_ref) ) ;
	    if(!o_ref ) {
		cerr << "Cannot create new objects " << fname << endl;
		ok = false;
	    } else {
		SH_DO( REF(a)::new_persistent ("a_ref_junk", 0644, a_ref) ) ;
		if(!a_ref ) {
		    cerr << "Cannot create new objects " << "a_ref_junk" << endl;
		    ok = false;
		} 
	    }
	    dotest();

	}
	SH_DO(SH_COMMIT_TRANSACTION);
    }

    destroy_obj(fname);
    destroy_obj("a_ref_junk");
    return 0;
}
开发者ID:glycerine,项目名称:shore-mt,代码行数:55,代码来源:sequences.C


示例19: nmi_selftest

void __init nmi_selftest(void)
{
	init_nmi_testsuite();

        /*
	 * Run the testsuite:
	 */
	printk("----------------\n");
	printk("| NMI testsuite:\n");
	printk("--------------------\n");

	print_testname("remote IPI");
	dotest(remote_ipi, SUCCESS);
	printk(KERN_CONT "\n");
	print_testname("local IPI");
	dotest(local_ipi, SUCCESS);
	printk(KERN_CONT "\n");

	cleanup_nmi_testsuite();

	if (unexpected_testcase_failures) {
		printk("--------------------\n");
		printk("BUG: %3d unexpected failures (out of %3d) - debugging disabled! |\n",
			unexpected_testcase_failures, testcase_total);
		printk("-----------------------------------------------------------------\n");
	} else if (expected_testcase_failures && testcase_successes) {
		printk("--------------------\n");
		printk("%3d out of %3d testcases failed, as expected. |\n",
			expected_testcase_failures, testcase_total);
		printk("----------------------------------------------------\n");
	} else if (expected_testcase_failures && !testcase_successes) {
		printk("--------------------\n");
		printk("All %3d testcases failed, as expected. |\n",
			expected_testcase_failures);
		printk("----------------------------------------\n");
	} else {
		printk("--------------------\n");
		printk("Good, all %3d testcases passed! |\n",
			testcase_successes);
		printk("---------------------------------\n");
	}
}
开发者ID:0-T-0,项目名称:ps4-linux,代码行数:42,代码来源:nmi_selftest.c


示例20: main

int main()
{
	try {
		dotest();
	}
	catch (libmapipp::mapi_exception e) {
		std::cout << e.what() << std::endl;
	}
	
	return 0;
}
开发者ID:EasyLinux,项目名称:Openchange,代码行数:11,代码来源:exception_test.cpp



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C++ dotty函数代码示例发布时间:2022-05-30
下一篇:
C++ dot_product函数代码示例发布时间:2022-05-30
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap