TestRegistry.h 1.0 KB

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