from pathlib import Path from policy_harness import body, run source=Path(__file__).parent/'addons/core/Scripts/Game/ERR/40_Chat/ERR_NativeSmoke.c' enabled=body(source,'static bool Enabled()').replace('System.','System::') run(r'''#include #include #include using string=std::string; namespace System { std::map args; bool GetCLIParam(string key,string& value){auto it=args.find(key);if(it==args.end())return false;value=it->second;return true;} } struct Actual {''' + enabled + r''' }; int main(){ assert(!Actual::Enabled()); System::args={{"errSmokeOutcome","player-death"}}; assert(!Actual::Enabled()); System::args["errSmoke"]="0"; assert(!Actual::Enabled()); System::args["errSmoke"]="1"; assert(Actual::Enabled()); for(string outcome : {"normal-escape-route","hq-memory","radio-network","mounted-ammo",""}) {System::args["errSmokeOutcome"]=outcome;assert(!Actual::Enabled());} System::args.erase("errSmokeOutcome"); assert(!Actual::Enabled()); } ''') print('PASS: actual diagnostic selector requires exact enabled player-death fixture')