Include the current addon, terrain integrations, tools, regression tests and recorded development evidence.
27 lines
1.7 KiB
Diff
27 lines
1.7 KiB
Diff
--- a/tests/test_native_memory_deadlines.py
|
|
+++ b/tests/test_native_memory_deadlines.py
|
|
@@ -36,13 +36,13 @@
|
|
start=smoke.index('m_ERRTestLostHelicopter = System.GetCLIParam(')
|
|
end=smoke.index('OnStop().Insert(ERR_StopHQPatrol);',start)
|
|
selector=smoke[start:end].replace('System.GetCLIParam("errSmokeOutcome", outcome) && ', '')
|
|
-selector=selector.replace('GetWorld().GetWorldTime()', 'now').replace('ERR_NativeConvoyCoverProbe.Enabled()', 'cover').replace('ERR_NativeMountedCourierProbe.Enabled()', 'courier').replace('ERR_NativeMaintenanceProbe.Enabled()', 'maintenance')
|
|
+selector=selector.replace('GetWorld().GetWorldTime()', 'now').replace('ERR_NativeConvoyCoverProbe.Enabled()', 'cover').replace('ERR_NativeMountedCourierProbe.Enabled()', 'courier').replace('ERR_NativeMaintenanceProbe.Enabled()', 'maintenance').replace('ERR_NativeMountedInterceptProbe.Enabled()', 'intercept')
|
|
flags=sorted(set(re.findall(r'\bm_ERRTest\w+',selector)))
|
|
run(r'''
|
|
#include <cassert>
|
|
#include <string>
|
|
using string = std::string;
|
|
-float deadline(string outcome,float now,bool cover=false,bool courier=false,bool maintenance=false){
|
|
+float deadline(string outcome,float now,bool cover=false,bool courier=false,bool maintenance=false,bool intercept=false){
|
|
[[maybe_unused]] bool DECLARATIONS;
|
|
float m_ERRSmokeDeadline=0;
|
|
SELECTOR
|
|
@@ -55,6 +55,7 @@
|
|
assert(deadline("hq-memory",now)==now+360000);
|
|
assert(deadline("hq-body",now)==now+240000);
|
|
assert(deadline("convoy",now)==now+540000);
|
|
+ assert(deadline("convoy",now,false,false,false,true)==now+840000);
|
|
assert(deadline("supply-convoys",now)==now+840000);
|
|
assert(deadline("convoy",now,true)==now+840000);
|
|
assert(deadline("mounted-ammo",now)==now+330000);
|