~mwinter4/maus/ckov-reco

« back to all changes in this revision

Viewing changes to tests/cpp_unit/Globals/GlobalsTest.cc

  • Committer: Durga Rajaram
  • Date: 2014-01-14 07:07:02 UTC
  • mfrom: (659.1.80 relcand)
  • Revision ID: durga@fnal.gov-20140114070702-2l1fuj1w6rraw7xe
Tags: MAUS-v0.7.6
MAUS-v0.7.6

Show diffs side-by-side

added added

removed removed

Lines of Context:
19
19
 
20
20
#include "gtest/gtest.h"
21
21
 
22
 
#include "src/legacy/Interface/Squeal.hh"
 
22
#include "Utils/Exception.hh"
23
23
#include "src/legacy/Interface/MICERun.hh"
24
24
#include "src/legacy/Interface/dataCards.hh"
25
25
 
76
76
    // Check that we get an exception if initialising with bad data and that
77
77
    // _process is still NULL
78
78
    EXPECT_THROW
79
 
          (GlobalsManager::InitialiseGlobals("not json"), Squeal);
80
 
    EXPECT_THROW(Globals::GetInstance(), Squeal);
 
79
          (GlobalsManager::InitialiseGlobals("not json"), MAUS::Exception);
 
80
    EXPECT_THROW(Globals::GetInstance(), MAUS::Exception);
81
81
 
82
82
    // Check that we don't get an exception if initialising with good data and
83
83
    // that _process is not NULL. We will check the member data initialisation
89
89
    // Try deleting
90
90
    GlobalsManager::DeleteGlobals();
91
91
    // Check that we now get an exception on delete (already deleted)
92
 
    EXPECT_THROW(GlobalsManager::DeleteGlobals(), Squeal);
 
92
    EXPECT_THROW(GlobalsManager::DeleteGlobals(), MAUS::Exception);
93
93
 
94
94
    // Check that we now get an exception (the pointer allocated to NULL)
95
 
    EXPECT_THROW(Globals::GetInstance(), Squeal);
 
95
    EXPECT_THROW(Globals::GetInstance(), MAUS::Exception);
96
96
 
97
97
    // Check that we can reinitialise okay
98
98
    GlobalsManager::InitialiseGlobals(str);