Fix - allow port be specified in URL
[dueringa_WikiWalker.git] / test / main.cpp
blob21a16f8c84065de25b37a728c26d29f87b342714
1 #include <UnitTest++/UnitTest++.h>
3 ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
4 //
5 // To add a test, simply put the following code in the a .cpp file of your
6 // choice:
7 //
8 // =================================
9 // Simple Test
10 // =================================
12 // TEST(YourTestName)
13 // {
14 // }
16 // The TEST macro contains enough machinery to turn this slightly odd-looking
17 // syntax into legal C++, and automatically register the test in a global list.
18 // This test list forms the basis of what is executed by RunAllTests().
20 // If you want to re-use a set of test data for more than one test, or provide
21 // setup/teardown for tests,
22 // you can use the TEST_FIXTURE macro instead. The macro requires that you pass
23 // it a class name that it will instantiate, so any setup and teardown code
24 // should be in its constructor and destructor.
26 // struct SomeFixture
27 // {
28 // SomeFixture() { /* some setup */ }
29 // ~SomeFixture() { /* some teardown */ }
31 // int testData;
32 // };
34 // TEST_FIXTURE(SomeFixture, YourTestName)
35 // {
36 // int temp = testData;
37 // }
39 // =================================
40 // Test Suites
41 // =================================
43 // Tests can be grouped into suites, using the SUITE macro. A suite serves as a
44 // namespace for test names, so that the same test name can be used in two
45 // difference contexts.
47 // SUITE(YourSuiteName)
48 // {
49 // TEST(YourTestName)
50 // {
51 // }
53 // TEST(YourOtherTestName)
54 // {
55 // }
56 // }
58 // This will place the tests into a C++ namespace called YourSuiteName, and make
59 // the suite name available to UnitTest++.
60 // RunAllTests() can be called for a specific suite name, so you can use this to
61 // build named groups of tests to be run together.
62 // Note how members of the fixture are used as if they are a part of the test,
63 // since the macro-generated test class derives from the provided fixture class.
66 ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
68 // run all tests
69 int main(int argc, char** argv)
71 return UnitTest::RunAllTests();