Skip to content

Commit

Permalink
Checks features are consistent in parsetestrecord
Browse files Browse the repository at this point in the history
  • Loading branch information
anba authored and Ms2ger committed Dec 18, 2024
1 parent ada0636 commit c3cbc32
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions tools/lint/lib/checks/parsetestrecord.py
Original file line number Diff line number Diff line change
Expand Up @@ -89,4 +89,14 @@ def run(self, name, meta, source):
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

0 comments on commit c3cbc32

Please sign in to comment.