int main() { CTest* p=nullptr; p = p; ForwardDeclared<int> * p1 = nullptr; TestFunction(p1); p1 = p1; ForwardDeclared2 * p2 = nullptr; TestFunction(p2); p2 = p2; }
void PASCAL MMCallbackProc(UINT wTimerID, UINT msg,DWORD dwUser,DWORD dwl,DWORD dw2) { if (nCtrl==1) { if(TestFunction()!=0) { } else { TestFunction(); flag = 0; } } }
// --------------------------------------------------------------------------- // CBCTestAppFrmAknViewCase::RunL // --------------------------------------------------------------------------- // void CBCTestAppFrmAknViewCase::RunL( TInt aCmd ) { if ( aCmd !=EBCTestAknView) { return; } // Call release before prepare to let container has time to draw the // control created in PrepareCaseL. ReleaseCaseL(); PrepareCaseL( aCmd ); TestFunction(); }
Eigen::MatrixXf TestDensity(unsigned size, unsigned num) { Eigen::MatrixXf rho(size,size); for(unsigned i=0; i<size; i++) { float y = static_cast<float>(i) / static_cast<float>(size-1); for(unsigned j=0; j<size; j++) { float x = static_cast<float>(j) / static_cast<float>(size-1); rho(j,i) = TestFunction(x,y); } } return rho; }
int main() { int a = 42; int b = StaticTestFunction(a); printf("Hello world\n"); TestFunction(); printf("From application, %d & %d\n", a, b); return 0; }
int main() { // try // { // TestFunction(); // } // catch (...) // { // std::cerr << "Caught an exception." << std::endl; // } TestFunction(); return 0; }
int syntakticka_anal() { //pomocna funkce pro kontrolu cele syntakticke analyzy v main.c souboru int navrat; tokenInit(&token); token = getNextToken(); if(token.stav == s_lex_error) { navrat = S_LEXIKALNI_CHYBA; } else navrat = PROGRAM(); tokenFree(&token); if(navrat == S_BEZ_CHYB) { navrat = TestFunction(ptrhtGlobal); } return navrat; }
int main(int argc, char **argv) { if (argc != 3) { return 1; } LIBXML_TEST_VERSION int numTests = 0; bool passed = TestFunction(argv[1], &numTests); xmlCleanupParser(); if (atoi(argv[2]) != numTests) { std::cerr << "EXPECTED " << argv[2] << " TESTS BUT " << numTests << " WERE RUN" << std::endl; return 1; } return (passed ? 0 : 1); }
int main() { #if MG_PLATFORM_WINDOWS && MUGGLE_DEBUG _CrtMemState s1, s2, s3; _CrtMemCheckpoint(&s1); #endif TestFunction(); TestPerformance(); #if MG_PLATFORM_WINDOWS && MUGGLE_DEBUG _CrtMemCheckpoint(&s2); if (_CrtMemDifference(&s3, &s1, &s2)) { _CrtMemDumpStatistics(&s3); } _CrtDumpMemoryLeaks(); #endif return 0; }
int main(int argc, char **argv) { Text a; struct text data; const char *abc = "abc"; printf("\n--Text--\n"); printf("init local stack object\n"); TextInitEmptyString(&data); printf("destroy local stack object\n"); data.destroy(&data); printf("\ncreate from string"); isNotNull(a = TextCreate(abc)); printf("length=%ld...%s\n", a->length(a), (size_t) a->length(a) == sizeof (abc)-1 ? "OK" : "FAIL"); printf("content same as original...%s\n", memcmp(a->string(a), abc, sizeof (abc)) == 0 ? "OK" : "FAIL"); printf("destroy a\n"); a->destroy(a); printf("\nTextCompareIgnoreCase\n"); TestCompareFunction(TextCompareIgnoreCase, TextCreate("a"), TextCreate("A"), 0); TestCompareFunction(TextCompareIgnoreCase, TextCreate("b"), TextCreate("A"), 1); TestCompareFunction(TextCompareIgnoreCase, TextCreate("a"), TextCreate("B"), -1); TestCompareFunction(TextCompareIgnoreCase, TextCreate("ab"), TextCreate("AB"), 0); TestCompareFunction(TextCompareIgnoreCase, TextCreate("ab"), TextCreate("A"), 1); TestCompareFunction(TextCompareIgnoreCase, TextCreate("a"), TextCreate("AB"), -1); TestCompareFunction(TextCompareIgnoreCase, TextCreate("ORDB.org"), TextCreate("ordborg"), -1); TestCompareFunction(TextCompareIgnoreCase, TextCreate("ORDB.org"), TextCreate("ordb.org"), 0); TestCompareFunction(TextCompareIgnoreCase, TextCreate("*****@*****.**"), TextCreate("*****@*****.**"), 0); printf("\nTextEndsWith\n"); TestFunction(TextEndsWithIgnoreCase, TextCreate(""), TextCreate("ordb.org"), -1); TestFunction(TextEndsWithIgnoreCase, TextCreate(".org"), TextCreate("ordb.org"), -1); TestFunction(TextEndsWithIgnoreCase, TextCreate("ORDB.org"), TextCreate("ordb.org"), sizeof("ordb.org")-1); TestFunction(TextEndsWithIgnoreCase, TextCreate("*****@*****.**"), TextCreate("ordb.org"), sizeof("ordb.org")-1); printf("\nTextSplitOn\n"); /* Empty string and empty delimeters. */ TestTextSplit(TextCreate(""), TextCreate(""), 1, 1); /* length=1 [] */ TestTextSplit(TextCreate(""), TextCreate(""), 0, 0); /* length=0 */ /* Empty string. */ TestTextSplit(TextCreate(""), TextCreate(","), 1, 1); /* length=1 [] */ TestTextSplit(TextCreate(""), TextCreate(","), 0, 0); /* length=0 */ /* Empty delimiters. */ TestTextSplit(TextCreate("a,b,c"), TextCreate(""), 1, 1); /* length=1 [a,b,c] */ TestTextSplit(TextCreate("a,b,c"), TextCreate(""), 0, 1); /* length=1 [a,b,c] */ /* Assorted combinations of empty tokens. */ TestTextSplit(TextCreate(","), TextCreate(","), 1, 2); /* length=2 [][] */ TestTextSplit(TextCreate(","), TextCreate(","), 0, 0); /* length=0 */ TestTextSplit(TextCreate("a,,"), TextCreate(","), 1, 3); /* length=3 [a][][] */ TestTextSplit(TextCreate("a,,"), TextCreate(","), 0, 1); /* length=1 [a] */ TestTextSplit(TextCreate(",b,"), TextCreate(","), 1, 3); /* length=3 [][b][] */ TestTextSplit(TextCreate(",b,"), TextCreate(","), 0, 1); /* length=1 [b] */ TestTextSplit(TextCreate(",,c"), TextCreate(","), 1, 3); /* length=3 [][][c] */ TestTextSplit(TextCreate(",,c"), TextCreate(","), 0, 1); /* length=1 [c] */ TestTextSplit(TextCreate("a,,c"), TextCreate(","), 1, 3); /* length=3 [a][][c] */ TestTextSplit(TextCreate("a,,c"), TextCreate(","), 0, 2); /* length=2 [a][c] */ TestTextSplit(TextCreate("a,b,c"), TextCreate(","), 1, 3); /* length=3 [a][b][c] */ TestTextSplit(TextCreate("a,b,c"), TextCreate(","), 0, 3); /* length=3 [a][b][c] */ /* Quoting of tokens. */ TestTextSplit(TextCreate("a,b\\,c"), TextCreate(","), 1, 2); /* length=2 [a][b,c] */ TestTextSplit(TextCreate("a,b\\,c"), TextCreate(","), 0, 2); /* length=2 [a][b,c] */ TestTextSplit(TextCreate("a,'b,c'"), TextCreate(","), 1, 2); /* length=2 [a][b,c] */ TestTextSplit(TextCreate("a,'b,c'"), TextCreate(","), 0, 2); /* length=2 [a][b,c] */ TestTextSplit(TextCreate("\"a,b\",c"), TextCreate(","), 1, 2); /* length=2 [a,b][c] */ TestTextSplit(TextCreate("\"a,b\",c"), TextCreate(","), 0, 2); /* length=2 [a,b][c] */ TestTextSplit(TextCreate("a,'b,c'd,e"), TextCreate(","), 1, 3); /* length=3 [a][b,cd][e] */ TestTextSplit(TextCreate("a,'b,c'd,e"), TextCreate(","), 0, 3); /* length=3 [a][b,cd][e] */ TestTextSplit(TextCreate("a,'',e"), TextCreate(","), 1, 3); /* length=3 [a][][e] */ TestTextSplit(TextCreate("a,'',e"), TextCreate(","), 0, 3); /* length=3 [a][][e] */ TestTextSplit(TextCreate("a,b''d,e"), TextCreate(","), 1, 3); /* length=3 [a][bd][e] */ TestTextSplit(TextCreate("a,b''d,e"), TextCreate(","), 0, 3); /* length=3 [a][bd][e] */ printf("\n--DONE--\n"); return 0; }