Skip to content

Commit

Permalink
Merge pull request #617 from nuclearkatie/source_packaging
Browse files Browse the repository at this point in the history
add recipes to source packaging tests to avoid undesired transmutation
  • Loading branch information
gonuke authored Jul 18, 2024
2 parents 2bbf4bc + 8126c14 commit 2724432
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
2 changes: 1 addition & 1 deletion CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ Since last release

**Added:**
* Added package parameter to storage (#603, #612)
* Added package parameter to source (#613)
* Added package parameter to source (#613, #617)

**Changed:**

Expand Down
4 changes: 4 additions & 0 deletions src/source_tests.cc
Original file line number Diff line number Diff line change
Expand Up @@ -164,12 +164,14 @@ TEST_F(SourceTest, Package) {

std::string config =
"<outcommod>commod</outcommod>"
"<outrecipe>recipe</outrecipe>"
"<package>testpackage</package>"
"<throughput>5</throughput>";

int simdur = 3;
cyclus::MockSim sim(cyclus::AgentSpec (":cycamore:Source"), config, simdur);

sim.context()->AddRecipe(recipe_name, recipe);
sim.context()->AddPackage(package_name, 3, 4, "first");
package = sim.context()->GetPackage(package_name);

Expand All @@ -193,13 +195,15 @@ TEST_F(SourceTest, TransportUnit) {

std::string config =
"<outcommod>commod</outcommod>"
"<outrecipe>recipe</outrecipe>"
"<package>testpackage</package>"
"<transport_unit>testtu</transport_unit>"
"<throughput>10</throughput>";

int simdur = 2;
cyclus::MockSim sim(cyclus::AgentSpec (":cycamore:Source"), config, simdur);

sim.context()->AddRecipe(recipe_name, recipe);
sim.context()->AddPackage(package_name, 3, 4, "equal");
package = sim.context()->GetPackage(package_name);
sim.context()->AddTransportUnit(tu_name, 2, 2);
Expand Down

0 comments on commit 2724432

Please sign in to comment.