Skip to content

Commit d68f1c8

Browse files
author
thk123
committed
Number the tests with padding so that they will correctly alphabetise
1 parent b21665d commit d68f1c8

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

src/cbmc/bmc_cover.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -335,7 +335,7 @@ bool bmc_covert::operator()()
335335
// Compute the test code
336336
test.source_code=gen.generate_tests(bmc.options,bmc.ns.get_symbol_table(),
337337
goto_functions,test.goto_trace,
338-
++test_case_no,goal_names);
338+
test_case_no,goal_names);
339339

340340
++test_case_no;
341341
}

src/test-c-gen/c_test_case_generator.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,9 @@ const std::string c_test_case_generatort::get_test_function_name(
4545

4646
std::ostringstream test_name;
4747

48-
test_name << sanitised_name << "_" << test_idx;
48+
49+
test_name << sanitised_name << "_";
50+
test_name << std::setfill('0') << std::setw(3) << test_idx;
4951

5052
return test_name.str();
5153
}

0 commit comments

Comments
 (0)