Esempio n. 1
0
// Main test program
//
int
main(int argc, char* argv[])
{
	/*
    try
	{
    */
		// Demonstrates the ability to use multiple test suites
		//
		Test::Suite ts;
        // Utility tests
		ts.add(auto_ptr<Test::Suite>(new StringUtilsTestSuite));
        // Graphical tests
		ts.add(auto_ptr<Test::Suite>(new RectTestSuite));
		ts.add(auto_ptr<Test::Suite>(new BezierPathTestSuite));
		ts.add(auto_ptr<Test::Suite>(new PathElementTestSuite));
		ts.add(auto_ptr<Test::Suite>(new ImageTestSuite));
		ts.add(auto_ptr<Test::Suite>(new CanvasTestSuite));
        // Node tests
		ts.add(auto_ptr<Test::Suite>(new NodeTestSuite));
		ts.add(auto_ptr<Test::Suite>(new ParameterTestSuite));
		ts.add(auto_ptr<Test::Suite>(new ConnectTestSuite));
		ts.add(auto_ptr<Test::Suite>(new NetworkTestSuite));
		ts.add(auto_ptr<Test::Suite>(new CanvasNodeTestSuite));

		// Run the tests
		//
		auto_ptr<Test::Output> output(cmdline(argc, argv));
		if (ts.run(*output, true))
		{
			Test::HtmlOutput* html = dynamic_cast<Test::HtmlOutput*>(output.get());
			if (html)
				html->generate(cout, true, "MyTest");
		}
	/*
    }
	catch (...)
	{
		cout << "unexpected exception encountered\n";
		return EXIT_FAILURE;
	}
    */
	return EXIT_SUCCESS;
}
Esempio n. 2
0
int main()
{
	TestDMail ets;
#ifdef TEST_HTML
	std::ofstream file;
	Test::HtmlOutput html;

	file.open( "dmail.html" );
	ets.run( html );
	html.generate( file, true, "DMail" );
	file.close();
#endif

#ifdef TEST_STDOUT
	Test::TextOutput output( Test::TextOutput::Verbose, std::cout );

	return ets.run( output ) ? EXIT_SUCCESS : EXIT_FAILURE;
#endif
	return EXIT_SUCCESS;
}
Esempio n. 3
0
int main()
{
  Test::Suite ts;
  
  #pragma clang diagnostic ignored "-Wdeprecated-declarations"
  ts.add(std::auto_ptr<Test::Suite>(new TestSuite_TYPES_3D));
  ts.add(std::auto_ptr<Test::Suite>(new TestSuite_COLLISIONS));
  
  //Test::TextOutput output(Test::TextOutput::Verbose);
  Test::HtmlOutput output;

  // run the tests
  auto result = ts.run(output);
  
  std::ofstream f;
  f.open("results.html");
  //output.generate(std::cout, true, "MyTest"); // can output directly to terminal
  output.generate(f, true, "Octree");

  return result;
}