Add configurable main-road checkpoints and reconnect replacements; record Workshop 0.0.136
continuous-integration/drone/push Build is passing
continuous-integration/drone/push Build is passing
This commit is contained in:
@@ -47,3 +47,23 @@ assert 'if (m_Target == 0) return Finish("disabled")' in s
|
||||
assert 'm_Positions.Count() >= m_Target' in s
|
||||
assert 'roadblockCount' not in body(settings,'static bool Randomizable(')
|
||||
print('PASS: road width/bridge/length checks, prison and post spacing, setting bounds/default, finite startup and owned HQ admission')
|
||||
|
||||
classes = body(p, 'static bool LargeRoad(') + body(p, 'static bool Needed(')
|
||||
run('#include <cassert>\n' + classes + r"""
|
||||
int main(){
|
||||
assert(!LargeRoad(5.99,6) && LargeRoad(6,6) && LargeRoad(16,6));
|
||||
assert(!LargeRoad(6,8) && LargeRoad(8,8));
|
||||
assert(Needed(false,0,2,1,1) && !Needed(true,0,2,1,1));
|
||||
assert(!Needed(false,2,2,0,1) && Needed(true,2,2,0,1));
|
||||
assert(!Needed(false,0,0,0,1) && Needed(true,0,0,0,1));
|
||||
assert(Needed(false,0,1,0,0) && !Needed(true,0,1,0,0));
|
||||
assert(!Needed(false,0,0,0,0) && !Needed(true,0,0,0,0));
|
||||
}
|
||||
""")
|
||||
assert 'ERR_RoadblockRules.Needed(m_Large, m_SmallPlaced, m_SmallTarget, m_LargePlaced, m_LargeTarget)' in body(p,'protected bool Candidate(')
|
||||
print('PASS: exact configurable width cutoff, separate quotas and independent disabling')
|
||||
|
||||
keys=set(re.findall(r'"([A-Za-z0-9]+)"',body(settings,'static array<string> Keys(')))
|
||||
initialized=set(re.findall(r'm_Values.Set\("([A-Za-z0-9]+)"',body(settings,'void ERR_Settings(')))
|
||||
assert keys <= initialized, keys-initialized
|
||||
print('PASS: every saved setting has a fresh-profile constructor default')
|
||||
|
||||
Reference in New Issue
Block a user