Skip to content

Commit

Permalink
add tests for Package
Browse files Browse the repository at this point in the history
  • Loading branch information
gonuke committed Mar 27, 2024
1 parent 31c9789 commit 0e232e0
Showing 1 changed file with 27 additions and 0 deletions.
27 changes: 27 additions & 0 deletions tests/package_tests.cc
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
#include <string>

#include <gtest/gtest.h>

#include "package.h"

using cyclus::Package;

TEST(PackageTests, Create) {

std::string exp_name = "foo";
double exp_min = 0.1;
double exp_max = 0.9;
std::string exp_strat = "first";

Package::Ptr p = Package::Create(exp_name, exp_min, exp_max, exp_strat);

EXPECT_EQ(exp_name, p->name());
EXPECT_DOUBLE_EQ(exp_min, p->fill_min());
EXPECT_DOUBLE_EQ(exp_max, p->fill_max());
EXPECT_EQ(exp_strat, p->strategy());

}

TEST(PackageTests, UnpackagedID) {
EXPECT_EQ(1, Package::unpackaged_id());
}

0 comments on commit 0e232e0

Please sign in to comment.