mirror of https://github.com/OpenTTD/OpenTTD
Add: ScriptCargo::GetWeight regression tests
parent
8d0d45c431
commit
be7db78767
|
@ -341,6 +341,7 @@ function Regression::Cargo()
|
||||||
print(" GetCargoIncome(10, 10): " + AICargo.GetCargoIncome(i, 10, 10));
|
print(" GetCargoIncome(10, 10): " + AICargo.GetCargoIncome(i, 10, 10));
|
||||||
print(" GetCargoIncome(100, 10): " + AICargo.GetCargoIncome(i, 100, 10));
|
print(" GetCargoIncome(100, 10): " + AICargo.GetCargoIncome(i, 100, 10));
|
||||||
print(" GetCargoIncome(10, 100): " + AICargo.GetCargoIncome(i, 10, 100));
|
print(" GetCargoIncome(10, 100): " + AICargo.GetCargoIncome(i, 10, 100));
|
||||||
|
print(" GetWeight(100): " + AICargo.GetWeight(i, 100));
|
||||||
print(" GetRoadVehicleTypeForCargo(): " + AIRoad.GetRoadVehicleTypeForCargo(i));
|
print(" GetRoadVehicleTypeForCargo(): " + AIRoad.GetRoadVehicleTypeForCargo(i));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1118,6 +1118,7 @@ ERROR: IsEnd() is invalid as Begin() is never called
|
||||||
GetCargoIncome(10, 10): -1
|
GetCargoIncome(10, 10): -1
|
||||||
GetCargoIncome(100, 10): -1
|
GetCargoIncome(100, 10): -1
|
||||||
GetCargoIncome(10, 100): -1
|
GetCargoIncome(10, 100): -1
|
||||||
|
GetWeight(100): -1
|
||||||
GetRoadVehicleTypeForCargo(): 1
|
GetRoadVehicleTypeForCargo(): 1
|
||||||
Cargo 0
|
Cargo 0
|
||||||
IsValidCargo(): true
|
IsValidCargo(): true
|
||||||
|
@ -1130,6 +1131,7 @@ ERROR: IsEnd() is invalid as Begin() is never called
|
||||||
GetCargoIncome(10, 10): 3
|
GetCargoIncome(10, 10): 3
|
||||||
GetCargoIncome(100, 10): 38
|
GetCargoIncome(100, 10): 38
|
||||||
GetCargoIncome(10, 100): 3
|
GetCargoIncome(10, 100): 3
|
||||||
|
GetWeight(100): 6
|
||||||
GetRoadVehicleTypeForCargo(): 0
|
GetRoadVehicleTypeForCargo(): 0
|
||||||
Cargo 1
|
Cargo 1
|
||||||
IsValidCargo(): true
|
IsValidCargo(): true
|
||||||
|
@ -1142,6 +1144,7 @@ ERROR: IsEnd() is invalid as Begin() is never called
|
||||||
GetCargoIncome(10, 10): 7
|
GetCargoIncome(10, 10): 7
|
||||||
GetCargoIncome(100, 10): 71
|
GetCargoIncome(100, 10): 71
|
||||||
GetCargoIncome(10, 100): 6
|
GetCargoIncome(10, 100): 6
|
||||||
|
GetWeight(100): 100
|
||||||
GetRoadVehicleTypeForCargo(): 1
|
GetRoadVehicleTypeForCargo(): 1
|
||||||
Cargo 2
|
Cargo 2
|
||||||
IsValidCargo(): true
|
IsValidCargo(): true
|
||||||
|
@ -1154,6 +1157,7 @@ ERROR: IsEnd() is invalid as Begin() is never called
|
||||||
GetCargoIncome(10, 10): 5
|
GetCargoIncome(10, 10): 5
|
||||||
GetCargoIncome(100, 10): 55
|
GetCargoIncome(100, 10): 55
|
||||||
GetCargoIncome(10, 100): 5
|
GetCargoIncome(10, 100): 5
|
||||||
|
GetWeight(100): 25
|
||||||
GetRoadVehicleTypeForCargo(): 1
|
GetRoadVehicleTypeForCargo(): 1
|
||||||
Cargo 3
|
Cargo 3
|
||||||
IsValidCargo(): true
|
IsValidCargo(): true
|
||||||
|
@ -1166,6 +1170,7 @@ ERROR: IsEnd() is invalid as Begin() is never called
|
||||||
GetCargoIncome(10, 10): 5
|
GetCargoIncome(10, 10): 5
|
||||||
GetCargoIncome(100, 10): 53
|
GetCargoIncome(100, 10): 53
|
||||||
GetCargoIncome(10, 100): 5
|
GetCargoIncome(10, 100): 5
|
||||||
|
GetWeight(100): 100
|
||||||
GetRoadVehicleTypeForCargo(): 1
|
GetRoadVehicleTypeForCargo(): 1
|
||||||
Cargo 4
|
Cargo 4
|
||||||
IsValidCargo(): true
|
IsValidCargo(): true
|
||||||
|
@ -1178,6 +1183,7 @@ ERROR: IsEnd() is invalid as Begin() is never called
|
||||||
GetCargoIncome(10, 10): 5
|
GetCargoIncome(10, 10): 5
|
||||||
GetCargoIncome(100, 10): 52
|
GetCargoIncome(100, 10): 52
|
||||||
GetCargoIncome(10, 100): 4
|
GetCargoIncome(10, 100): 4
|
||||||
|
GetWeight(100): 18
|
||||||
GetRoadVehicleTypeForCargo(): 1
|
GetRoadVehicleTypeForCargo(): 1
|
||||||
Cargo 5
|
Cargo 5
|
||||||
IsValidCargo(): true
|
IsValidCargo(): true
|
||||||
|
@ -1190,6 +1196,7 @@ ERROR: IsEnd() is invalid as Begin() is never called
|
||||||
GetCargoIncome(10, 10): 7
|
GetCargoIncome(10, 10): 7
|
||||||
GetCargoIncome(100, 10): 74
|
GetCargoIncome(100, 10): 74
|
||||||
GetCargoIncome(10, 100): 6
|
GetCargoIncome(10, 100): 6
|
||||||
|
GetWeight(100): 50
|
||||||
GetRoadVehicleTypeForCargo(): 1
|
GetRoadVehicleTypeForCargo(): 1
|
||||||
Cargo 6
|
Cargo 6
|
||||||
IsValidCargo(): true
|
IsValidCargo(): true
|
||||||
|
@ -1202,6 +1209,7 @@ ERROR: IsEnd() is invalid as Begin() is never called
|
||||||
GetCargoIncome(10, 10): 5
|
GetCargoIncome(10, 10): 5
|
||||||
GetCargoIncome(100, 10): 58
|
GetCargoIncome(100, 10): 58
|
||||||
GetCargoIncome(10, 100): 4
|
GetCargoIncome(10, 100): 4
|
||||||
|
GetWeight(100): 100
|
||||||
GetRoadVehicleTypeForCargo(): 1
|
GetRoadVehicleTypeForCargo(): 1
|
||||||
Cargo 7
|
Cargo 7
|
||||||
IsValidCargo(): true
|
IsValidCargo(): true
|
||||||
|
@ -1214,6 +1222,7 @@ ERROR: IsEnd() is invalid as Begin() is never called
|
||||||
GetCargoIncome(10, 10): 6
|
GetCargoIncome(10, 10): 6
|
||||||
GetCargoIncome(100, 10): 60
|
GetCargoIncome(100, 10): 60
|
||||||
GetCargoIncome(10, 100): 5
|
GetCargoIncome(10, 100): 5
|
||||||
|
GetWeight(100): 100
|
||||||
GetRoadVehicleTypeForCargo(): 1
|
GetRoadVehicleTypeForCargo(): 1
|
||||||
Cargo 8
|
Cargo 8
|
||||||
IsValidCargo(): true
|
IsValidCargo(): true
|
||||||
|
@ -1226,6 +1235,7 @@ ERROR: IsEnd() is invalid as Begin() is never called
|
||||||
GetCargoIncome(10, 10): 6
|
GetCargoIncome(10, 10): 6
|
||||||
GetCargoIncome(100, 10): 62
|
GetCargoIncome(100, 10): 62
|
||||||
GetCargoIncome(10, 100): 5
|
GetCargoIncome(10, 100): 5
|
||||||
|
GetWeight(100): 100
|
||||||
GetRoadVehicleTypeForCargo(): 1
|
GetRoadVehicleTypeForCargo(): 1
|
||||||
Cargo 9
|
Cargo 9
|
||||||
IsValidCargo(): true
|
IsValidCargo(): true
|
||||||
|
@ -1238,6 +1248,7 @@ ERROR: IsEnd() is invalid as Begin() is never called
|
||||||
GetCargoIncome(10, 10): 6
|
GetCargoIncome(10, 10): 6
|
||||||
GetCargoIncome(100, 10): 69
|
GetCargoIncome(100, 10): 69
|
||||||
GetCargoIncome(10, 100): 6
|
GetCargoIncome(10, 100): 6
|
||||||
|
GetWeight(100): 100
|
||||||
GetRoadVehicleTypeForCargo(): 1
|
GetRoadVehicleTypeForCargo(): 1
|
||||||
Cargo 10
|
Cargo 10
|
||||||
IsValidCargo(): true
|
IsValidCargo(): true
|
||||||
|
@ -1250,6 +1261,7 @@ ERROR: IsEnd() is invalid as Begin() is never called
|
||||||
GetCargoIncome(10, 10): 9
|
GetCargoIncome(10, 10): 9
|
||||||
GetCargoIncome(100, 10): 90
|
GetCargoIncome(100, 10): 90
|
||||||
GetCargoIncome(10, 100): 7
|
GetCargoIncome(10, 100): 7
|
||||||
|
GetWeight(100): 12
|
||||||
GetRoadVehicleTypeForCargo(): 1
|
GetRoadVehicleTypeForCargo(): 1
|
||||||
Cargo 11
|
Cargo 11
|
||||||
IsValidCargo(): false
|
IsValidCargo(): false
|
||||||
|
@ -1262,6 +1274,7 @@ ERROR: IsEnd() is invalid as Begin() is never called
|
||||||
GetCargoIncome(10, 10): -1
|
GetCargoIncome(10, 10): -1
|
||||||
GetCargoIncome(100, 10): -1
|
GetCargoIncome(100, 10): -1
|
||||||
GetCargoIncome(10, 100): -1
|
GetCargoIncome(10, 100): -1
|
||||||
|
GetWeight(100): -1
|
||||||
GetRoadVehicleTypeForCargo(): 1
|
GetRoadVehicleTypeForCargo(): 1
|
||||||
Cargo 12
|
Cargo 12
|
||||||
IsValidCargo(): false
|
IsValidCargo(): false
|
||||||
|
@ -1274,6 +1287,7 @@ ERROR: IsEnd() is invalid as Begin() is never called
|
||||||
GetCargoIncome(10, 10): -1
|
GetCargoIncome(10, 10): -1
|
||||||
GetCargoIncome(100, 10): -1
|
GetCargoIncome(100, 10): -1
|
||||||
GetCargoIncome(10, 100): -1
|
GetCargoIncome(10, 100): -1
|
||||||
|
GetWeight(100): -1
|
||||||
GetRoadVehicleTypeForCargo(): 1
|
GetRoadVehicleTypeForCargo(): 1
|
||||||
Cargo 13
|
Cargo 13
|
||||||
IsValidCargo(): false
|
IsValidCargo(): false
|
||||||
|
@ -1286,6 +1300,7 @@ ERROR: IsEnd() is invalid as Begin() is never called
|
||||||
GetCargoIncome(10, 10): -1
|
GetCargoIncome(10, 10): -1
|
||||||
GetCargoIncome(100, 10): -1
|
GetCargoIncome(100, 10): -1
|
||||||
GetCargoIncome(10, 100): -1
|
GetCargoIncome(10, 100): -1
|
||||||
|
GetWeight(100): -1
|
||||||
GetRoadVehicleTypeForCargo(): 1
|
GetRoadVehicleTypeForCargo(): 1
|
||||||
Cargo 14
|
Cargo 14
|
||||||
IsValidCargo(): false
|
IsValidCargo(): false
|
||||||
|
@ -1298,6 +1313,7 @@ ERROR: IsEnd() is invalid as Begin() is never called
|
||||||
GetCargoIncome(10, 10): -1
|
GetCargoIncome(10, 10): -1
|
||||||
GetCargoIncome(100, 10): -1
|
GetCargoIncome(100, 10): -1
|
||||||
GetCargoIncome(10, 100): -1
|
GetCargoIncome(10, 100): -1
|
||||||
|
GetWeight(100): -1
|
||||||
GetRoadVehicleTypeForCargo(): 1
|
GetRoadVehicleTypeForCargo(): 1
|
||||||
|
|
||||||
--CargoList--
|
--CargoList--
|
||||||
|
|
Loading…
Reference in New Issue