mirror of
https://github.com/Kitware/CMake.git
synced 2025-12-31 10:50:16 -06:00
Tests/RunCMake/FileAPI: Improve error on unexpected line numbers
This commit is contained in:
@@ -5,6 +5,7 @@ import re
|
||||
|
||||
if sys.version_info[0] >= 3:
|
||||
unicode = str
|
||||
long = int
|
||||
|
||||
def is_bool(x, val=None):
|
||||
return isinstance(x, bool) and (val is None or x == val)
|
||||
|
||||
@@ -24,7 +24,7 @@ def check_backtrace(t, b, backtrace):
|
||||
|
||||
if expected["line"] is not None:
|
||||
expected_keys.append("line")
|
||||
assert is_int(node["line"], expected["line"])
|
||||
assert is_int(node["line"], expected["line"]), repr(node["line"]) + " != " + repr(expected["line"])
|
||||
|
||||
if expected["command"] is not None:
|
||||
expected_keys.append("command")
|
||||
|
||||
Reference in New Issue
Block a user