|
253 | 253 | 'runtime/string',
|
254 | 254 | 'runtime/threadsafe_fn',
|
255 | 255 | 'runtime/vlog',
|
256 |
| - 'runtime/catch_scenario', |
| 256 | + 'runtime/catch_test_tags', |
257 | 257 | 'whitespace/blank_line',
|
258 | 258 | 'whitespace/braces',
|
259 | 259 | 'whitespace/comma',
|
@@ -6150,24 +6150,23 @@ def AssembleString(clean_lines, start_lineno, start_linepos, end_lineno, end_lin
|
6150 | 6150 | full_string += clean_lines.elided[end_lineno][:end_linepos]
|
6151 | 6151 | return full_string
|
6152 | 6152 |
|
6153 |
| -def CheckScenarioHasTags(filename, clean_lines, linenum, error): |
| 6153 | +def CheckCatchTestHasTags(filename, clean_lines, linenum, error): |
6154 | 6154 | line = clean_lines.elided[linenum]
|
6155 |
| - scenario = Match(r'^SCENARIO\(', line) |
6156 |
| - if not scenario: return |
| 6155 | + test = Match(r'^(SCENARIO|TEST_CASE)\(', line) |
| 6156 | + if not test: return |
6157 | 6157 |
|
6158 | 6158 | closing_line, closing_linenum, closing_pos = CloseExpression(clean_lines, linenum, line.find('('))
|
6159 | 6159 |
|
6160 | 6160 | if closing_pos == -1:
|
6161 | 6161 | error(filename, linenum,
|
6162 |
| - 'runtime/catch_scenario', 4, "Can't find closing bracket for scenario") |
| 6162 | + 'runtime/catch_test_tags', 4, "Can't find closing bracket for catch test") |
6163 | 6163 |
|
6164 | 6164 | full_string = AssembleString(
|
6165 | 6165 | clean_lines, linenum, line.find('(') + 1, closing_linenum, closing_pos - 1)
|
6166 | 6166 |
|
6167 | 6167 | if(full_string.find(',') == -1):
|
6168 | 6168 | error(filename, linenum,
|
6169 |
| - 'runtime/catch_scenario', 4, "Can't find `,\' seperating scenario name and the tags: " + str(clean_lines.lines[linenum])) |
6170 |
| - |
| 6169 | + 'runtime/catch_test_tags', 4, "Can't find `,\' seperating test name and the tags: " + str(clean_lines.lines[linenum])) |
6171 | 6170 |
|
6172 | 6171 | def CheckRedundantVirtual(filename, clean_lines, linenum, error):
|
6173 | 6172 | """Check if line contains a redundant "virtual" function-specifier.
|
@@ -6362,7 +6361,7 @@ def ProcessLine(filename, file_extension, clean_lines, line,
|
6362 | 6361 | CheckInvalidIncrement(filename, clean_lines, line, error)
|
6363 | 6362 | CheckMakePairUsesDeduction(filename, clean_lines, line, error)
|
6364 | 6363 | CheckRedundantVirtual(filename, clean_lines, line, error)
|
6365 |
| - CheckScenarioHasTags(filename, clean_lines, line, error) |
| 6364 | + CheckCatchTestHasTags(filename, clean_lines, line, error) |
6366 | 6365 | CheckNamespaceOrUsing(filename, clean_lines, line, error)
|
6367 | 6366 | CheckForEndl(filename, clean_lines, line, error)
|
6368 | 6367 | for check_fn in extra_check_functions:
|
|
0 commit comments