本文整理汇总了C++中DoTest函数的典型用法代码示例。如果您正苦于以下问题:C++ DoTest函数的具体用法?C++ DoTest怎么用?C++ DoTest使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了DoTest函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: Display
static void Display( void )
{
if (Interactive) {
DoFrame();
glutSwapBuffers();
} else {
int success, retry;
printf("\nFirst frame\n-----------\n");
DoFrame();
success = DoTest();
glutSwapBuffers();
printf("\nSecond frame\n------------\n");
glMatrixMode( GL_PROJECTION );
glLoadIdentity();
glOrtho( 0, 3*(NUM_TESTS+1), -1.5, 1.5, -1, 1 );
glMatrixMode( GL_MODELVIEW );
glLoadIdentity();
DoFrame();
retry = DoTest();
glutSwapBuffers();
if (retry && success) {
printf("\nPIGLIT: { 'result': 'pass' }\n");
} else if (retry || success) {
printf("\nPIGLIT: { 'result': 'warn', 'note': 'Inconsistent results in first and second frame' }\n");
} else {
printf("\nPIGLIT: { 'result': 'fail' }\n");
}
exit(0);
}
}
示例2: main
VOID
main()
{
DbgPrint("Machine\n");
DoTest((HANDLE)REG_LOCAL_MACHINE);
DbgPrint("User\n");
DoTest((HANDLE)REG_LOCAL_USER);
}
示例3: E32Main
GLDEF_C TInt E32Main()
{
test.Title();
test.Start(_L("Create chunk"));
RChunk c;
TInt r=c.CreateDisconnectedLocal(0,0x1000,0x100000);
test(r==KErrNone);
r=c.Commit(0x10000,0x1000);
test(r==KErrNone);
TUint8* pBuf1=c.Base();
TUint8* pBuf2=pBuf1+0x10000;
TInt s;
TInt d;
TInt l;
for (l=1; l<300; l+=3)
{
for (s=0; s<=4096-l; s+=227)
{
test.Printf(_L("\ns=%4d l=%4d: "),s,l);
for (d=0; d<=4096-l; d+=229)
{
DoTest(pBuf1,pBuf2,4096,s,d,l,0);
DoTest(pBuf1,pBuf2,4096,s,d,l,1);
}
}
}
for (l=1; l<300; l+=3)
{
for (s=4096-l; s>=0; s-=227)
{
test.Printf(_L("\ns=%4d l=%4d: "),s,l);
for (d=4096-l; d>=0; d-=229)
{
DoTest(pBuf1,pBuf2,4096,s,d,l,0);
DoTest(pBuf1,pBuf2,4096,s,d,l,1);
}
}
}
for (l=1; l<400; l+=((l<=64)?1:3) )
{
test.Printf(_L("\nOverlap test: l=%4d: "),l);
for (s=32; s<=4096-32-l; s+=101) // want s to take all values 0...31 modulo 32
{
for (d=s-32; d<=s+32; ++d)
{
DoOverlapTest(pBuf1,pBuf2,4096,s,d,l);
}
}
}
c.Close();
test.End();
return 0;
}
示例4: main
int main() {
BaseInterface* b1 = DoTest(4.5f);
b1->doPrint();
BaseInterface* b2 = DoTest(5);
b2->doPrint();
delete b1;
delete b2;
return 0;
}
示例5: main
int
main(int argc, char *argv[])
{
DoTest(0);
DoTest(1);
printf("Done.\n");
return 0;
}
示例6: UT_Base64_Test
void UT_Base64_Test(FILE * fp)
{
#define DoTest(t) #t, UT_TestStatus_GetMessage((t)())
fprintf(fp,"UT_Base64_Test:\n");
fprintf(fp,"\tTest: %s result %s\n", DoTest(t_test_001) );
fprintf(fp,"\tTest: %s result %s\n", DoTest(t_test_002) );
fprintf(fp,"\tTest: %s result %s\n", DoTest(t_test_003) );
// add other base64 tests here
}
示例7: main
int
main(int argc, char *argv[])
{
odbc_connect();
DoTest(0);
DoTest(1);
odbc_disconnect();
printf("Done.\n");
return 0;
}
示例8: StartTrace
void ConfiguredActionTest::TestCases() {
StartTrace(ConfiguredActionTest.TestCases);
Anything testCases;
long runOnlySz = GetConfig()["RunOnly"].GetSize();
if (runOnlySz > 0) {
String warning;
warning << "ConfiguredActionTest not complete : Running only " << runOnlySz << " Testcases";
t_assertm(false, (const char *)warning);
for (long i = 0; i < runOnlySz; ++i) {
String testCaseName = GetConfig()["RunOnly"][i].AsString("Unknown");
testCases[testCaseName] = GetTestCaseConfig()[testCaseName].DeepClone();
}
TraceAny(testCases, "TestCases");
} else {
testCases = GetTestCaseConfig().DeepClone();
}
long sz = testCases.GetSize();
for (long i = 0; i < sz; ++i) {
if (i > 0) {
std::cerr << ".";
}
String testCaseName = testCases.SlotName(i);
DoTest(PrepareConfig(testCases[i]), testCaseName);
}
}
示例9: MixerTest_DoMenuItem
// MixerTest_DoMenuItem()
// -----------------------------------------------------
//
//
void MixerTest_DoMenuItem(int menu, int subMenu)
{
BAEResult err;
err = BAE_NO_ERROR;
switch (menu)
{
case 1:
err = DoScript(subMenu);
break;
case 2:
err = DoFunction(subMenu);
break;
case 3:
err = DoTest(subMenu);
break;
default:
break;
}
if (err)
{
printf("\a! Error code: %s (%d)\n", BAEResultToStr(err), (int)err);
}
else
{
printf("OK.\n");
}
}
示例10: DoAllTests
int DoAllTests(int nN, int *Ns, int nX, int *Xs, int nY, int *Ys)
{
int in, ix, iy, ia, ib, iret=0, i=0, j, k;
char *passfail;
char *t1=" ITST N incX TEST";
char *t2="====== ======== ==== ======";
fprintf(stdout, "%s\n", t1);
fprintf(stdout, "%s\n", t2);
for (in=0; in < nN; in++)
{
for (ix=0; ix < nX; ix++)
{
j = DoTest(Ns[in], Xs[ix]);
iret += j;
if (j == 0) passfail = "PASSED";
else passfail = "FAILED";
fprintf(stdout, "%6d %9d %5d %s\n",
i, Ns[in], Xs[ix], passfail);
i++;
}
}
if (iret == 0) fprintf(stdout, "ALL ASUM SANITY TESTS PASSED.\n\n");
else fprintf(stdout, "%d of %d ASUM TESTS FAILED!!\n\n", iret, i);
return(iret);
}
示例11: main
int __cdecl main(int argc,char *argv[])
{
char ValidPtr[256];
if(PAL_Initialize(argc, argv))
{
return FAIL;
}
/* with valid pointer, zero-size and valid size must succeed */
DoTest(ValidPtr, 0, 1);
DoTest(ValidPtr, 42, 1);
PAL_Terminate();
return PASS;
}
示例12: main
int main()
{
DoTest();
cNetworkSingleton::Get().Terminate();
LOGD("Network test finished");
return 0;
}
示例13: About
INT_PTR CALLBACK About(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam)
{
UNREFERENCED_PARAMETER(lParam);
switch (message)
{
case WM_INITDIALOG:
return (INT_PTR)TRUE;
case WM_COMMAND:
switch (LOWORD(wParam))
{
case IDOK:
DoTest(hDlg);
EndDialog(hDlg, LOWORD(wParam));
break;
case IDCANCEL:
default:
EndDialog(hDlg, LOWORD(wParam));
break;
}
return (INT_PTR)TRUE;
}
return (INT_PTR)FALSE;
}
示例14: main
int __cdecl main(int argc, char *argv[])
{
if (0 != PAL_Initialize(argc,argv))
{
return FAIL;
}
DoTest(szStar, szDot, szDotDot);
DoTest(szStarDotStar, szDot, szDotDot);
PAL_Terminate();
return PASS;
}
示例15: main
int main()
{
struct sigaction sigact;
sigact.sa_sigaction = Handle;
sigemptyset(&sigact.sa_mask);
sigact.sa_flags = SA_SIGINFO;
if (sigaction(SIGSEGV, &sigact, 0) == -1)
{
fprintf(stderr, "Unable handle SIGSEGV\n");
return 1;
}
if (sigaction(SIGBUS, &sigact, 0) == -1)
{
fprintf(stderr, "Unable handle SIGBUS\n");
return 1;
}
sigsetjmp(JumpBuffer, 1);
for (;;)
{
if (!DoTest(TestNumber))
{
printf("Last test\n");
break;
}
printf("Failed to raise signal\n");
TestNumber++;
}
return 0;
}