Checks features are consistent in parsetestrecord

This commit is contained in:
André Bargull 2024-12-18 10:05:37 +01:00 committed by Ms2ger
parent ada06362dc
commit c3cbc32745
1 changed files with 10 additions and 0 deletions

View File

@ -89,4 +89,14 @@ class CheckParseTestRecord(Check):
elif "flags" in test_rec:
return "Unexpected flags present in parseTestRecord"
# Ensure all features in `test_rec` are consistent with `meta`.
if "features" in meta:
if "features" not in test_rec:
return "Features not present in parseTestRecord"
if meta["features"] != test_rec["features"]:
return "Features don't match parseTestRecord"
elif "features" in test_rec:
return "Unexpected features present in parseTestRecord"
return None