~mbogomilov/maus/devel3

« back to all changes in this revision

Viewing changes to tests/cpp_unit/Simulation/MAUSPrimaryGeneratorActionTest.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:
113
113
    EXPECT_EQ(part_in.pid,  event->GetPrimaryVertex()->GetPrimary()->GetPDGcode());
114
114
 
115
115
    for (size_t i=0; i<5; ++i) {
116
 
        EXPECT_THROW(primary->GeneratePrimaries(event), Squeal);
 
116
        EXPECT_THROW(primary->GeneratePrimaries(event), MAUS::Exception);
117
117
    }
118
118
 
119
119
    delete event;
145
145
    EXPECT_EQ(part_in.pid, part_out.pid);
146
146
    EXPECT_EQ(part_in.seed, part_out.seed);
147
147
 
 
148
    // Test bad (negative assigned to unsigned int) seed value in JSON
 
149
    bool passed = false;
 
150
    val["random_seed"] = Json::Value(-1);
 
151
    try {
 
152
      part_out.ReadJson(val);
 
153
    } catch (MAUS::Exception exc) {
 
154
      passed = true;
 
155
    }
 
156
    EXPECT_TRUE(passed);
148
157
}
149
158
 
150
159
TEST_F(MAUSPrimaryGeneratorActionTest, PGParticleFromVirtualHitTest) {