コード例 #1
0
ファイル: main.cpp プロジェクト: apronchenkov/mipt-oop-399-2
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;
}
コード例 #2
0
ファイル: array.C プロジェクト: Grindland/memview
int
main()
{
    bool    ok = true;

    ok &= testBasic();

    return ok ? 0 : 1;
}
コード例 #3
0
void rice::p2p::replication::manager::testing::ReplicationManagerRegrTest::runTest()
{
    for (auto i = int32_t(0); i < NUM_NODES; i++) 
                simulate();

    testBasic();
    testOverload();
    testStress();
    testMaintenance();
}
コード例 #4
0
ファイル: data.c プロジェクト: jaingaurav/rstm
int
main ()
{
    puts("Test 1:");
    testAll(10, 20, 10, 10);

    puts("Test 2:");
    testBasic(20, 80, 10, 20);

    puts("Done");

    return 0;
}
コード例 #5
0
ファイル: Var.cpp プロジェクト: EQ4/jamoma2
		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();
		}
コード例 #6
0
 void FastCLAClassifierTest::RunTests()
 {
   testBasic();
 }
コード例 #7
0
ファイル: SampleBundle.cpp プロジェクト: EQ4/jamoma2
		SampleBundleTest(Jamoma::UnitTest<SampleBundleTest>* test)
		: mTest(test)
		{
			testBasic();
		}
コード例 #8
0
ファイル: check_lpel2.c プロジェクト: EffyLiu0301/lpel
int main(void)
{
  testBasic();
  printf("test finished\n");
  return 0;
}
コード例 #9
0
void rice::p2p::replication::testing::ReplicationRegrTest::runTest()
{
    testBasic();
    testMaintenance();
}