From 51cb9cc43fd220351d8a3f68f4e9f4f7a087b856 Mon Sep 17 00:00:00 2001 From: yexo Date: Wed, 16 Dec 2009 22:04:31 +0000 Subject: (svn r18519) -Codechange: Improve regression tests for AIOrder --- bin/ai/regression/regression.nut | 23 +++++++++++++++++++++++ bin/ai/regression/regression.txt | 23 +++++++++++++++++++++++ 2 files changed, 46 insertions(+) (limited to 'bin/ai') diff --git a/bin/ai/regression/regression.nut b/bin/ai/regression/regression.nut index 230ed2634..b009ef0de 100644 --- a/bin/ai/regression/regression.nut +++ b/bin/ai/regression/regression.nut @@ -838,14 +838,37 @@ function Regression::Order() print(" GetOrderCount(): " + AIOrder.GetOrderCount(12)); print(" GetOrderDestination(): " + AIOrder.GetOrderDestination(12, 1)); print(" AreOrderFlagsValid(): " + AIOrder.AreOrderFlagsValid(33416, AIOrder.AIOF_TRANSFER)); + print(" AreOrderFlagsValid(): " + AIOrder.AreOrderFlagsValid(33416, AIOrder.AIOF_TRANSFER | AIOrder.AIOF_UNLOAD)); + print(" AreOrderFlagsValid(): " + AIOrder.AreOrderFlagsValid(33416, AIOrder.AIOF_TRANSFER | AIOrder.AIOF_FULL_LOAD)); + print(" AreOrderFlagsValid(): " + AIOrder.AreOrderFlagsValid(33417, AIOrder.AIOF_SERVICE_IF_NEEDED)); + print(" AreOrderFlagsValid(): " + AIOrder.AreOrderFlagsValid(33417, AIOrder.AIOF_STOP_IN_DEPOT)); + print(" AreOrderFlagsValid(): " + AIOrder.AreOrderFlagsValid(0, AIOrder.AIOF_SERVICE_IF_NEEDED | AIOrder.AIOF_GOTO_NEAREST_DEPOT)); + print(" IsValidConditionalOrder(): " + AIOrder.IsValidConditionalOrder(AIOrder.OC_LOAD_PERCENTAGE, AIOrder.CF_EQUALS)); + print(" IsValidConditionalOrder(): " + AIOrder.IsValidConditionalOrder(AIOrder.OC_RELIABILITY, AIOrder.CF_IS_TRUE)); + print(" IsValidConditionalOrder(): " + AIOrder.IsValidConditionalOrder(AIOrder.OC_REQUIRES_SERVICE, AIOrder.CF_IS_FALSE)); + print(" IsValidConditionalOrder(): " + AIOrder.IsValidConditionalOrder(AIOrder.OC_AGE, AIOrder.CF_INVALID)); print(" IsValidVehicleOrder(): " + AIOrder.IsValidVehicleOrder(12, 1)); + print(" IsGotoStationOrder(): " + AIOrder.IsGotoStationOrder(12, 1)); + print(" IsGotoDepotOrder(): " + AIOrder.IsGotoDepotOrder(12, 1)); + print(" IsGotoWaypointOrder(): " + AIOrder.IsGotoWaypointOrder(12, 1)); + print(" IsConditionalOrder(): " + AIOrder.IsConditionalOrder(12, 1)); + print(" IsCurrentOrderPartOfOrderList(): " + AIOrder.IsCurrentOrderPartOfOrderList(12)); print(" GetOrderFlags(): " + AIOrder.GetOrderFlags(12, 1)); print(" AppendOrder(): " + AIOrder.AppendOrder(12, 33416, AIOrder.AIOF_TRANSFER)); print(" InsertOrder(): " + AIOrder.InsertOrder(12, 0, 33416, AIOrder.AIOF_TRANSFER)); print(" GetOrderCount(): " + AIOrder.GetOrderCount(12)); print(" IsValidVehicleOrder(): " + AIOrder.IsValidVehicleOrder(12, 1)); + print(" IsGotoStationOrder(): " + AIOrder.IsGotoStationOrder(12, 1)); + print(" IsGotoDepotOrder(): " + AIOrder.IsGotoDepotOrder(12, 1)); + print(" IsGotoWaypointOrder(): " + AIOrder.IsGotoWaypointOrder(12, 1)); + print(" IsConditionalOrder(): " + AIOrder.IsConditionalOrder(12, 1)); + print(" IsCurrentOrderPartOfOrderList(): " + AIOrder.IsCurrentOrderPartOfOrderList(12)); + print(" GetOrderFlags(): " + AIOrder.GetOrderFlags(12, 0)); + print(" GetOrderFlags(): " + AIOrder.GetOrderFlags(12, 1)); + print(" GetOrderJumpTo(): " + AIOrder.GetOrderJumpTo(12, 1)); print(" RemoveOrder(): " + AIOrder.RemoveOrder(12, 0)); print(" SetOrderFlags(): " + AIOrder.SetOrderFlags(12, 0, AIOrder.AIOF_FULL_LOAD)); + print(" GetOrderFlags(): " + AIOrder.GetOrderFlags(12, 0)); print(" GetOrderDestination(): " + AIOrder.GetOrderDestination(12, 0)); print(" CopyOrders(): " + AIOrder.CopyOrders(12, 1)); print(" CopyOrders(): " + AIOrder.CopyOrders(13, 12)); diff --git a/bin/ai/regression/regression.txt b/bin/ai/regression/regression.txt index 4b70aa11e..0adf36e1c 100644 --- a/bin/ai/regression/regression.txt +++ b/bin/ai/regression/regression.txt @@ -8488,14 +8488,37 @@ GetOrderCount(): 0 GetOrderDestination(): -1 AreOrderFlagsValid(): true + AreOrderFlagsValid(): false + AreOrderFlagsValid(): true + AreOrderFlagsValid(): true + AreOrderFlagsValid(): true + AreOrderFlagsValid(): true + IsValidConditionalOrder(): true + IsValidConditionalOrder(): false + IsValidConditionalOrder(): true + IsValidConditionalOrder(): false IsValidVehicleOrder(): false + IsGotoStationOrder(): false + IsGotoDepotOrder(): false + IsGotoWaypointOrder(): false + IsConditionalOrder(): false + IsCurrentOrderPartOfOrderList(): false GetOrderFlags(): 65535 AppendOrder(): true InsertOrder(): true GetOrderCount(): 2 IsValidVehicleOrder(): true + IsGotoStationOrder(): true + IsGotoDepotOrder(): false + IsGotoWaypointOrder(): false + IsConditionalOrder(): false + IsCurrentOrderPartOfOrderList(): false + GetOrderFlags(): 8 + GetOrderFlags(): 8 + GetOrderJumpTo(): -1 RemoveOrder(): true SetOrderFlags(): true + GetOrderFlags(): 64 GetOrderDestination(): 33411 CopyOrders(): false CopyOrders(): true -- cgit v1.2.3-70-g09d2