| 1 | /* ---------------------------------------------------------------------------- |
| 2 | |
| 3 | * GTSAM Copyright 2010, Georgia Tech Research Corporation, |
| 4 | * Atlanta, Georgia 30332-0415 |
| 5 | * All Rights Reserved |
| 6 | * Authors: Frank Dellaert, et al. (see THANKS for the full author list) |
| 7 | |
| 8 | * See LICENSE for the license information |
| 9 | |
| 10 | * -------------------------------------------------------------------------- */ |
| 11 | |
| 12 | /////////////////////////////////////////////////////////////////////////////// |
| 13 | // |
| 14 | // TESTREGISTRY.H |
| 15 | // |
| 16 | // TestRegistry is a singleton collection of all the tests to run in a system. |
| 17 | // |
| 18 | /////////////////////////////////////////////////////////////////////////////// |
| 19 | |
| 20 | #ifndef TESTREGISTRY_H |
| 21 | #define TESTREGISTRY_H |
| 22 | |
| 23 | |
| 24 | class Test; |
| 25 | class TestResult; |
| 26 | |
| 27 | |
| 28 | |
| 29 | class TestRegistry |
| 30 | { |
| 31 | public: |
| 32 | static void addTest (Test *test); |
| 33 | static int runAllTests (TestResult& result); |
| 34 | |
| 35 | private: |
| 36 | |
| 37 | static TestRegistry& instance (); |
| 38 | void add (Test *test); |
| 39 | int run (TestResult& result); |
| 40 | |
| 41 | |
| 42 | Test *tests; |
| 43 | Test *lastTest; |
| 44 | |
| 45 | }; |
| 46 | |
| 47 | |
| 48 | |
| 49 | |
| 50 | #endif |
| 51 | |