int main(int argc, char** argv) { _CrtSetDbgFlag(_CRTDBG_ALLOC_MEM_DF | _CRTDBG_LEAK_CHECK_DF); setRandSeed(12345679); if (argc != 2) exitWithUsageError(); if (strcmp(argv[1], "-t") == 0) { std::cerr << "Testing basic graph activity.\n"; testBasic(); std::cerr << "Testing Tarjan`s algorithm.\n"; testTarjan(); std::cerr << "Testing 2-SAT solution.\n"; test2SAT(); return 0; } std::unique_ptr<IDigraph> graph = prepareInput(argv[1]); int variables = graph->getNumberOfVertices() / 2; std::vector<int> result = solve2SAT(graph, variables); if (result[0] == -1) std::cout << "No solution." << std::endl; else { std::cout << "Solution is:" << std::endl; for (int i = 0; i < variables; i++) std::cout << i + 1 << " -- " << (result[i] == 0 ? "false" : "true") << std::endl; } return 0; }
int main() { bool ok = true; ok &= testBasic(); return ok ? 0 : 1; }
void rice::p2p::replication::manager::testing::ReplicationManagerRegrTest::runTest() { for (auto i = int32_t(0); i < NUM_NODES; i++) simulate(); testBasic(); testOverload(); testStress(); testMaintenance(); }
int main () { puts("Test 1:"); testAll(10, 20, 10, 10); puts("Test 2:"); testBasic(20, 80, 10, 20); puts("Done"); return 0; }
VarTest(Jamoma::UnitTest<VarTest>* test) : mTest(test) { // Some informational posts before we get started... std::cout << "size of double: " << sizeof(double) << std::endl; std::cout << "size of TaggedValue<double>: " << sizeof(TaggedValue<double>) << std::endl; std::cout << "size of std::vector<double>: " << sizeof(std::vector<double>) << std::endl; std::vector<double> vec16 = {0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15}; std::cout << "size of std::vector<double> len=16: " << sizeof(vec16) << std::endl; std::cout << "size of std::string: " << sizeof(std::string) << std::endl; std::cout << "size of long long: " << sizeof(long long) << std::endl; std::cout << "size of long double: " << sizeof(long double) << std::endl; std::cout << "size of std::vector<long double>: " << sizeof(std::vector<long double>) << std::endl; std::cout << "size of Function: " << sizeof(Function) << std::endl; std::cout << "size of TimePoint: " << sizeof(TimePoint) << std::endl; // Now actually run the tests testBasic(); }
void FastCLAClassifierTest::RunTests() { testBasic(); }
SampleBundleTest(Jamoma::UnitTest<SampleBundleTest>* test) : mTest(test) { testBasic(); }
int main(void) { testBasic(); printf("test finished\n"); return 0; }
void rice::p2p::replication::testing::ReplicationRegrTest::runTest() { testBasic(); testMaintenance(); }