Skip to content

Commit

Permalink
[CI] Add unit test for invalid explicit thirdbody
Browse files Browse the repository at this point in the history
  • Loading branch information
ischoegl committed Aug 12, 2023
1 parent 2a50885 commit 87937e3
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions test/kinetics/kineticsFromScratch.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -269,6 +269,17 @@ TEST_F(KineticsFromScratch, skip_undefined_third_body)
ASSERT_EQ((size_t) 1, kin.nReactions());
}

TEST_F(KineticsFromScratch, skip_explicit_third_body)
{
string equation = "2 O + CO2 <=> O2 + CO2";
auto rate = make_shared<ArrheniusRate>(1.2e11, -1.0, 0.0);
auto R = make_shared<Reaction>(equation, rate);
EXPECT_EQ(R->thirdBody()->name(), "CO2");

kin.skipUndeclaredThirdBodies(true);
ASSERT_THROW(kin.addReaction(R), CanteraError);
}

TEST_F(KineticsFromScratch, add_falloff_reaction1)
{
// reaction 2:
Expand Down

0 comments on commit 87937e3

Please sign in to comment.