Skip to content

Commit

Permalink
Added producer test for substitute components
Browse files Browse the repository at this point in the history
  • Loading branch information
gitMarky committed Dec 21, 2018
1 parent b731696 commit 2ed69b9
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions planet/Tests.ocf/Producers.ocs/Script.c
Expand Up @@ -430,6 +430,8 @@ global func Test5_OnStart(int plr)
passed &= doTest("Costs for single component object (Metal). Got %v, expected %v.", producer->ProductionCosts(Metal), [[Ore, 1, nil]]);
passed &= doTest("Costs for multi component object (Pickaxe). Got %v, expected %v.", producer->ProductionCosts(Pickaxe), [[Metal, 1, nil], [Wood, 1, nil]]);
passed &= doTest("Costs for object with liquid and fuel need (Bread). Got %v, expected %v.", producer->ProductionCosts(Bread), [[Flour, 1, nil], [Water, 50, nil]]);
passed &= doTest("Costs for object with a single substitute component (Loam). Got %v, expected %v.", producer->ProductionCosts(Loam), [[Earth, 2, Sand], [Water, 60, nil]]);
passed &= doTest("Costs for object with multiple substitute components (TeleGlove). Got %v, expected %v.", producer->ProductionCosts(TeleGlove), [[Diamond, 1, [Ruby, Amethyst]], [Metal, 2, nil]]);

producer->RemoveObject();
return passed;
Expand Down

0 comments on commit 2ed69b9

Please sign in to comment.