~mbogomilov/maus/devel3

« back to all changes in this revision

Viewing changes to tests/cpp_unit/API/OutputBaseTest.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:
41
41
      FRIEND_TEST(OutputBaseTest, TestCopyConstructor);
42
42
  };
43
43
 
44
 
  class MyOutputter_squeal : public MyOutputter {
 
44
  class MyOutputter_maus_exception : public MyOutputter {
45
45
    public:
46
 
      MyOutputter_squeal() : MyOutputter() {}
 
46
      MyOutputter_maus_exception() : MyOutputter() {}
47
47
 
48
48
    private:
49
49
      virtual bool _save(int* i) {
50
 
        throw Squeal(Squeal::recoverable,
51
 
           "Expected Test Squeal in _save",
 
50
        throw MAUS::Exception(MAUS::Exception::recoverable,
 
51
           "Expected Test MAUS::Exception in _save",
52
52
           "int* _save(int* t) const");
53
53
      }
54
54
  };
131
131
    int* dub = 0;
132
132
    ASSERT_FALSE(mm2.save(dub));
133
133
    /////////////////////////////////////////////////////
134
 
    MyOutputter_squeal mm_s;
 
134
    MyOutputter_maus_exception mm_s;
135
135
    try {
136
136
      mm_s.save(i1);
137
137
    }
138
138
    catch(...) {
139
139
      ASSERT_TRUE(false)
140
 
        << "Fail: Squeal should have been handled"
 
140
        << "Fail: MAUS::Exception should have been handled"
141
141
        << std::endl;
142
142
    }
143
143
 
148
148
    }
149
149
    catch(...) {
150
150
      ASSERT_TRUE(false)
151
 
        << "Fail: Exception should have been handled"
 
151
        << "Fail: MAUS::Exception should have been handled"
152
152
        << std::endl;
153
153
    }
154
154