(svn r12243) [NoAI] -Fix r12242: move the regression-test for AITileList_Industry* to TileList(), and show that they really work by using the Valuators to proof that noai
authortruebrain
Sun, 24 Feb 2008 23:41:06 +0000
branchnoai
changeset 9758 f01f3df7cfbe
parent 9757 5cdc14959fb6
child 9759 e6c07e89b89f
(svn r12243) [NoAI] -Fix r12242: move the regression-test for AITileList_Industry* to TileList(), and show that they really work by using the Valuators to proof that
bin/ai/regression/regression.nut
--- a/bin/ai/regression/regression.nut	Sun Feb 24 23:34:42 2008 +0000
+++ b/bin/ai/regression/regression.nut	Sun Feb 24 23:41:06 2008 +0000
@@ -255,24 +255,6 @@
 	}
 	print("  Valid Industries:    " + j);
 	print("  GetIndustryCount():  " + AIIndustry.GetIndustryCount());
-
-	local list = AITileList_IndustryAccepting(0, 3);
-	print("");
-	print("--TileList_IndustryAccepting--");
-	print("  Count():             " + list.Count());
-	print("  Location ListDump:");
-	for (local i = list.Begin(); list.HasNext(); i = list.Next()) {
-		print("    " + i + " => " + list.GetValue(i));
-	}
-
-	local list = AITileList_IndustryProducing(1, 3);
-	print("");
-	print("--TileList_IndustryProducing--");
-	print("  Count():             " + list.Count());
-	print("  Location ListDump:");
-	for (local i = list.Begin(); list.HasNext(); i = list.Next()) {
-		print("    " + i + " => " + list.GetValue(i));
-	}
 }
 
 function Regression::IndustryList()
@@ -759,6 +741,26 @@
 	for (local i = list.Begin(); list.HasNext(); i = list.Next()) {
 		print("    " + i + " => " + list.GetValue(i));
 	}
+
+	local list = AITileList_IndustryAccepting(0, 3);
+	print("");
+	print("--TileList_IndustryAccepting--");
+	print("  Count():             " + list.Count());
+	list.Valuate(AITileList_vCargoAcceptance(3, 1, 1, 3));
+	print("  Location ListDump:");
+	for (local i = list.Begin(); list.HasNext(); i = list.Next()) {
+		print("    " + i + " => " + list.GetValue(i));
+	}
+
+	local list = AITileList_IndustryProducing(1, 3);
+	print("");
+	print("--TileList_IndustryProducing--");
+	print("  Count():             " + list.Count());
+	list.Valuate(AITileList_vBuildable());
+	print("  Location ListDump:");
+	for (local i = list.Begin(); list.HasNext(); i = list.Next()) {
+		print("    " + i + " => " + list.GetValue(i));
+	}
 }
 
 function Regression::Town()