/** *************************************************************************************************** * @run The MojSchema provides a mechanism to validate the JSON data objects. Schema Test include the following: 1.typeTest 2.disallowTest 3.propertiesTest 4.ItemsTest 5.requiresTest 6.minmaxTest 7.arrayTest 8.stringTest 9.enumTest 10.divisibleTest * @param : None * @retval : MojErr *************************************************************************************************** **/ MojErr MojSchemaTest::run() { MojErr err = typeTest(); MojTestErrCheck(err); err = disallowTest(); MojTestErrCheck(err); err = propertiesTest(); MojTestErrCheck(err); err = itemsTest(); MojTestErrCheck(err); err = requiresTest(); MojTestErrCheck(err); err = minmaxTest(); MojTestErrCheck(err); err = arrayTest(); MojTestErrCheck(err); err = stringTest(); MojTestErrCheck(err); err = enumTest(); MojTestErrCheck(err); err = divisibleTest(); MojTestErrCheck(err); return MojErrNone; }
MojErr MojVectorTest::run() { MojErr err = intTest(); MojTestErrCheck(err); err = stringTest(); MojTestErrCheck(err); err = objTest(); MojTestErrCheck(err); return MojErrNone; }
int RegressionTask(void) { TC_PRINT("Validating access to supported libraries\n"); if (limitsTest() || stdboolTest() || stddefTest() || stdintTest() || stringTest()) { TC_PRINT("Library validation failed\n"); return TC_FAIL; } TC_PRINT("Validation complete\n"); return TC_PASS; }
int main(int argc, char** argv) { // eigenSpeedTest(); // linearReusableStorageTest(); // pointCloudTest(); /* initialize random seed: */ // stringFormatterTest(); // Test::serializeKdTree(); // Test::kdTreeTest(); // AABBnDTest(); // calcualteExpectedMassBin(); // calculateExpectedMass(); // calculateExpectedMassSimple(); // profileVectorBuffers(); // convertSomeNumbers(); // doBenchmark(); stringTest(); // doBenchmark(); // SceneParser1::test(); // SceneParser2::test(); // runTest(); // runRangeTest(); // frontBackBufferTest(); // proxProfile(); // printCompileTimeTable(); // fstreamBufferTest(); // fstreamOpenCloseTest(); // copyConstructorTest(); // iteratorTestRun(); // templateTemplateParamsTest(); // constVariantTest(); // multiIndexContainerTest(); // mortonKeyTest(); return 0; };
int search_zorro(char option, BOOL testExpected, char *testValue) { BOOL returnCode = FALSE; struct ConfigDev *myCD = NULL; UWORD m,t; UBYTE p; char manufacturer[8] = "0"; char product[8] = "0"; char type[20] = "Unknown"; if((ExpansionBase = OpenLibrary("expansion.library", 0L)) == NULL) return FALSE; while((myCD = FindConfigDev(myCD, -1L, -1L))) { /* search for all ConfigDevs */ m = myCD->cd_Rom.er_Manufacturer; p = myCD->cd_Rom.er_Product; t = myCD->cd_Rom.er_Type; snprintf(manufacturer, 8, "%ld", m); snprintf(product, 8, "%ld", p); snprintf(type, 8, "%ld", t); if (testExpected) { switch ((unsigned int)option) { case 'v': if (stringTest(manufacturer, testValue)) returnCode = TRUE; break; case 'p': if (stringTest(product, testValue)) returnCode = TRUE; break; case 't': if (stringTest(type, testValue)) returnCode = TRUE; break; case '1': case '2': case '3': break; default: error("Invalid option"); exit(EXIT_ERROR); break; } } else { switch ((unsigned int)option) { case 'v': printf("%s\n", manufacturer); break; case 'p': printf("%s\n", product); break; case 't': printf("%s\n", type); break; case '1': printf("\n"); break; case '2': printf("\n"); break; case '3': printf("\n"); break; default: printf("ZORRO:%s:%s:%s:::\n", manufacturer, product, type); break; } } } CloseLibrary(ExpansionBase); return returnCode; }
int main(void) { basicTest(); stringTest(); return 0; }