diff options
author | yexo <yexo@openttd.org> | 2009-12-16 22:04:31 +0000 |
---|---|---|
committer | yexo <yexo@openttd.org> | 2009-12-16 22:04:31 +0000 |
commit | 51cb9cc43fd220351d8a3f68f4e9f4f7a087b856 (patch) | |
tree | 10ffece62feadc0479763b1bc1da0b99561444c8 /bin/ai/regression | |
parent | 04dfadc523485ceb8de49e4fcdf79f7d0ba5d7e3 (diff) | |
download | openttd-51cb9cc43fd220351d8a3f68f4e9f4f7a087b856.tar.xz |
(svn r18519) -Codechange: Improve regression tests for AIOrder
Diffstat (limited to 'bin/ai/regression')
-rw-r--r-- | bin/ai/regression/regression.nut | 23 | ||||
-rw-r--r-- | bin/ai/regression/regression.txt | 23 |
2 files changed, 46 insertions, 0 deletions
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 |