Skip to content

Commit

Permalink
[UnitTests] Allow phases that specify kinetics without reactions
Browse files Browse the repository at this point in the history
  • Loading branch information
ischoegl committed Apr 19, 2022
1 parent c345040 commit 97ca1c8
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
2 changes: 1 addition & 1 deletion test/data/phase-reaction-spec1.yaml
Expand Up @@ -11,7 +11,7 @@ phases:
kinetics: gas
reactions: none

# should be an error
# should work fine (kinetics model with no reactions)
- name: kinetics-no-reaction-section1
species: [{gri30.yaml/species: [O2, H2, H2O]}]
thermo: ideal-gas
Expand Down
7 changes: 4 additions & 3 deletions test/kinetics/kineticsFromYaml.cpp
Expand Up @@ -451,9 +451,10 @@ TEST(KineticsFromYaml, KineticsModelWithReactionsNone2)

TEST(KineticsFromYaml, KineticsModelWithoutReactionsSection1)
{
EXPECT_THROW(newSolution("phase-reaction-spec1.yaml",
"kinetics-no-reaction-section1"),
InputFileError);
auto soln = newSolution("phase-reaction-spec1.yaml",
"kinetics-no-reaction-section1");
EXPECT_EQ(soln->kinetics()->kineticsType(), "Gas");
EXPECT_EQ(soln->kinetics()->nReactions(), (size_t) 0);
}

TEST(KineticsFromYaml, KineticsModelWithoutReactionsSection2)
Expand Down

0 comments on commit 97ca1c8

Please sign in to comment.