From 10c918d4a24b671cf2b77d8b252ff4538817f025 Mon Sep 17 00:00:00 2001 From: Mark Date: Wed, 1 Jun 2016 20:08:55 +0200 Subject: [PATCH] Fixed producers unit test #5 The problems here were: - the pickaxe component list returned [[Metal, 1], [Wood, 1]] instead of [[Wood, 1], [Metal, 1]]. This may be a result of the new component system with proplists; probably the components are sorted alphabetically now --- planet/Tests.ocf/Producers.ocs/Script.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/planet/Tests.ocf/Producers.ocs/Script.c b/planet/Tests.ocf/Producers.ocs/Script.c index b044586e5..422fc8997 100644 --- a/planet/Tests.ocf/Producers.ocs/Script.c +++ b/planet/Tests.ocf/Producers.ocs/Script.c @@ -428,7 +428,7 @@ global func Test5_OnStart(int plr) Log("Testing the behaviour of ProductionCosts()"); passed &= doTest("Costs for single component object (Metal). Got %v, expected %v.", producer->ProductionCosts(Metal), [[Ore, 1]]); - passed &= doTest("Costs for multi component object (Pickaxe). Got %v, expected %v.", producer->ProductionCosts(Pickaxe), [[Wood, 1], [Metal, 1]]); + passed &= doTest("Costs for multi component object (Pickaxe). Got %v, expected %v.", producer->ProductionCosts(Pickaxe), [[Metal, 1], [Wood, 1]]); passed &= doTest("Costs for object with liquid and fuel need (Bread). Got %v, expected %v.", producer->ProductionCosts(Bread), [[Flour, 1], [Water, 50]]); producer->RemoveObject();