~christopher-hunt08/maus/beam_selection_development

« back to all changes in this revision

Viewing changes to tests/cpp_unit/MAUSUnitTest.cc

  • Committer: Chris Rogers
  • Date: 2012-10-13 18:43:00 UTC
  • mfrom: (663.6.137 merge)
  • mto: (663.6.204 merge)
  • mto: This revision was merged to the branch mainline in revision 680.
  • Revision ID: chris.rogers@stfc.ac.uk-20121013184300-ry9q81m45dmtgejr
Bring control room branch into line with trunk

Show diffs side-by-side

added added

removed removed

Lines of Context:
15
15
 *
16
16
 */
17
17
 
18
 
// Will run tests in all files included below
19
 
// If you just want to run against a subset of files
20
 
// comment the rest out and recompile
21
 
 
22
18
#include <string>
23
19
 
24
20
#include "gtest/gtest.h"
54
50
    std::string("\"particle_id\":-13,\"energy\":226.0,\"time\":0.0,")+
55
51
    std::string("\"random_seed\":10}")
56
52
  );
 
53
  config["stepping_algorithm"] = "ClassicalRK4";
 
54
  config["delta_one_step"] = -1.;
 
55
  config["delta_intersection"] = -1.;
 
56
  config["epsilon_min"] = -1.;
 
57
  config["epsilon_max"] = -1.;
 
58
  config["miss_distance"] = -1.;
 
59
  config["everything_special_virtual"] = false;
 
60
  config["field_tracker_absolute_error"] = 1.e-4;
 
61
  config["field_tracker_relative_error"] = 1.e-4;
 
62
 
57
63
  return config;
58
64
}
59
65
 
60
66
int main(int argc, char **argv) {
61
67
  int test_out = -1;
62
68
  try {
 
69
      std::cout << "Initialising Globals" << std::endl;
63
70
      MAUS::GlobalsManager::InitialiseGlobals
64
 
                                         (JsonWrapper::JsonToString(SetupConfig()));
 
71
                                     (JsonWrapper::JsonToString(SetupConfig()));
65
72
      ::testing::InitGoogleTest(&argc, argv);
 
73
      std::cout << "Running tests" << std::endl;
66
74
      test_out = RUN_ALL_TESTS();
67
75
  } catch(Squeal squee) {
68
76
      std::cerr << squee.GetMessage() << "\n" << squee.GetLocation() << "\n"