Bridge++  Ver. 1.1.x
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
run_testmanager.cpp
Go to the documentation of this file.
1 /*
2  @file $Id: run_testmanager.cpp #$
3 
4  @brief
5 
6  @author
7  $LastChangedBy: aoym $
8 
9  @date $LastChangedDate: 2013-04-12 13:28:01 #$
10 
11  @version $LastChangedRevision: 929 $
12 */
13 
14 #include "main.h"
15 #include "test.h"
16 #include "testlist.h"
17 #include "testManager.h"
18 
19 //====================================================================
20 int run_testmanager(int argc, char **argv)
21 {
22  TestManager& testmanager = TestManager::Instance(); // find singleton
23 
24 #ifdef USE_TESTMANAGER_AUTOREGISTER
25  //- tests are registered automatically at start up.
26 
27 #else
28  //- register tests manually:
29  //
30  // testmanager.registerTest(
31  // "Gauge.Plaquette",
32  // Test_Gauge::plaquette
33  // );
34 #endif
35 
36  if (argc > 1) {
37  for (int i = 1; i < argc; ++i) {
38  testmanager.batch(argv[i]);
39  }
40  } else {
41  testmanager.interactive();
42  }
43 
44  return 0;
45 }