Introduce white list of error codes, which are not covered by tests

This commit is contained in:
a3d4 2020-07-22 03:57:18 +02:00
parent 47ab6e73a7
commit 9eed519faa

View File

@ -186,6 +186,16 @@ def examine_id_coverage(top_dir, source_id_to_file_names):
# Warning (3420): Source file does not specify required compiler version! # Warning (3420): Source file does not specify required compiler version!
test_ids |= find_ids_in_cmdline_test_err(path.join(top_dir, "test", "cmdlineTests", "error_codes", "err")) test_ids |= find_ids_in_cmdline_test_err(path.join(top_dir, "test", "cmdlineTests", "error_codes", "err"))
# white list of ids which are not covered by tests
white_ids = {
"3805", # "This is a pre-release compiler version, please do not use it in production."
# The warning may or may not exist in a compiler build.
"4591" # "There are more than 256 warnings. Ignoring the rest."
# Due to 3805, the warning lists look different for different compiler builds.
}
assert len(test_ids & white_ids) == 0, "The sets are not supposed to intersect"
test_ids |= white_ids
print(f"IDs in source files: {len(source_ids)}") print(f"IDs in source files: {len(source_ids)}")
print(f"IDs in test files : {len(test_ids)} ({len(test_ids) - len(source_ids)})") print(f"IDs in test files : {len(test_ids)} ({len(test_ids) - len(source_ids)})")
print() print()