Skip to content

Commit

Permalink
add some explanation to package tests
Browse files Browse the repository at this point in the history
  • Loading branch information
gonuke committed Mar 29, 2024
1 parent a121688 commit cf9a485
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions tests/package_tests.cc
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,19 @@ TEST(PackageTests, Create) {
EXPECT_DOUBLE_EQ(exp_max, p->fill_max());
EXPECT_EQ(exp_strat, p->strategy());

// note: can't test this against a specific package ID because
// that value changes depending on which order all the
// tests are run and whether they are all run
// Therefore: test that it's not the same as the unpackaged ID
EXPECT_NE(Package::unpackaged_id(), p->id());

Package::Ptr q = Package::Create(exp_name, exp_min, exp_max, exp_strat);
// note: can't test this against a specific package ID because
// that value changes depending on which order all the
// tests are run and whether they are all run
// Therefore: test that it's not the same as the unpackaged ID
// or as the previous package
EXPECT_NE(Package::unpackaged_id(), q->id());
EXPECT_NE(q->id(), p->id());

}
Expand Down

0 comments on commit cf9a485

Please sign in to comment.