Skip to content

Commit ff37e06

Browse files
committed
removed invalid showtime test cases for thread and process executors
1 parent dddfbf5 commit ff37e06

File tree

2 files changed

+0
-94
lines changed

2 files changed

+0
-94
lines changed

test/testprocessexecutor.cpp

Lines changed: 0 additions & 47 deletions
Original file line numberDiff line numberDiff line change
@@ -96,10 +96,6 @@ class TestProcessExecutor : public TestFixture {
9696
TEST_CASE(one_error_less_files);
9797
TEST_CASE(one_error_several_files);
9898
TEST_CASE(markup);
99-
TEST_CASE(showtime_top5_file);
100-
TEST_CASE(showtime_top5_summary);
101-
TEST_CASE(showtime_file);
102-
TEST_CASE(showtime_summary);
10399
TEST_CASE(showtime_top5_file_j);
104100
TEST_CASE(showtime_top5_summary_j);
105101
TEST_CASE(showtime_file_j);
@@ -235,49 +231,6 @@ class TestProcessExecutor : public TestFixture {
235231

236232
// TODO: provide data which actually shows values above 0
237233

238-
void showtime_top5_file() {
239-
REDIRECT;
240-
check(1, 2, 0,
241-
"int main() {}",
242-
true, SHOWTIME_MODES::SHOWTIME_TOP5_FILE);
243-
const std::string output_s = GET_REDIRECT_OUTPUT;
244-
// for each file: top5 results + overall + empty line
245-
TODO_ASSERT_EQUALS((5 + 1 + 1) * 2, 0, cppcheck::count_all_of(output_s, '\n'));
246-
}
247-
248-
void showtime_top5_summary() {
249-
REDIRECT;
250-
check(1, 2, 0,
251-
"int main() {}",
252-
true, SHOWTIME_MODES::SHOWTIME_TOP5_SUMMARY);
253-
const std::string output_s = GET_REDIRECT_OUTPUT;
254-
// once: top5 results + overall + empty line
255-
TODO_ASSERT_EQUALS(5 + 1 + 1, 0, cppcheck::count_all_of(output_s, '\n'));
256-
// should only report the top5 once
257-
ASSERT(output_s.find("1 result(s)") == std::string::npos);
258-
TODO_ASSERT(output_s.find("2 result(s)") != std::string::npos);
259-
}
260-
261-
void showtime_file() {
262-
REDIRECT;
263-
check(1, 2, 0,
264-
"int main() {}",
265-
true, SHOWTIME_MODES::SHOWTIME_FILE);
266-
const std::string output_s = GET_REDIRECT_OUTPUT;
267-
TODO_ASSERT_EQUALS(2, 0, cppcheck::count_all_of(output_s, "Overall time:"));
268-
}
269-
270-
void showtime_summary() {
271-
REDIRECT;
272-
check(1, 2, 0,
273-
"int main() {}",
274-
true, SHOWTIME_MODES::SHOWTIME_SUMMARY);
275-
const std::string output_s = GET_REDIRECT_OUTPUT;
276-
// should only report the actual summary once
277-
ASSERT(output_s.find("1 result(s)") == std::string::npos);
278-
TODO_ASSERT(output_s.find("2 result(s)") != std::string::npos);
279-
}
280-
281234
void showtime_top5_file_j() {
282235
REDIRECT; // should not cause TSAN failures as the showtime logging is synchronized
283236
check(2, 2, 0,

test/testthreadexecutor.cpp

Lines changed: 0 additions & 47 deletions
Original file line numberDiff line numberDiff line change
@@ -96,10 +96,6 @@ class TestThreadExecutor : public TestFixture {
9696
TEST_CASE(one_error_less_files);
9797
TEST_CASE(one_error_several_files);
9898
TEST_CASE(markup);
99-
TEST_CASE(showtime_top5_file);
100-
TEST_CASE(showtime_top5_summary);
101-
TEST_CASE(showtime_file);
102-
TEST_CASE(showtime_summary);
10399
TEST_CASE(showtime_top5_file_j);
104100
TEST_CASE(showtime_top5_summary_j);
105101
TEST_CASE(showtime_file_j);
@@ -233,49 +229,6 @@ class TestThreadExecutor : public TestFixture {
233229

234230
// TODO: provide data which actually shows values above 0
235231

236-
void showtime_top5_file() {
237-
REDIRECT;
238-
check(1, 2, 0,
239-
"int main() {}",
240-
true, SHOWTIME_MODES::SHOWTIME_TOP5_FILE);
241-
const std::string output_s = GET_REDIRECT_OUTPUT;
242-
// for each file: top5 results + overall + empty line
243-
ASSERT_EQUALS((5 + 1 + 1) * 2, cppcheck::count_all_of(output_s, '\n'));
244-
}
245-
246-
void showtime_top5_summary() {
247-
REDIRECT;
248-
check(1, 2, 0,
249-
"int main() {}",
250-
true, SHOWTIME_MODES::SHOWTIME_TOP5_SUMMARY);
251-
const std::string output_s = GET_REDIRECT_OUTPUT;
252-
// once: top5 results + overall + empty line
253-
ASSERT_EQUALS(5 + 1 + 1, cppcheck::count_all_of(output_s, '\n'));
254-
// should only report the top5 once
255-
ASSERT(output_s.find("1 result(s)") == std::string::npos);
256-
ASSERT(output_s.find("2 result(s)") != std::string::npos);
257-
}
258-
259-
void showtime_file() {
260-
REDIRECT;
261-
check(1, 2, 0,
262-
"int main() {}",
263-
true, SHOWTIME_MODES::SHOWTIME_FILE);
264-
const std::string output_s = GET_REDIRECT_OUTPUT;
265-
ASSERT_EQUALS(2, cppcheck::count_all_of(output_s, "Overall time:"));
266-
}
267-
268-
void showtime_summary() {
269-
REDIRECT;
270-
check(1, 2, 0,
271-
"int main() {}",
272-
true, SHOWTIME_MODES::SHOWTIME_SUMMARY);
273-
const std::string output_s = GET_REDIRECT_OUTPUT;
274-
// should only report the actual summary once
275-
ASSERT(output_s.find("1 result(s)") == std::string::npos);
276-
ASSERT(output_s.find("2 result(s)") != std::string::npos);
277-
}
278-
279232
void showtime_top5_file_j() {
280233
REDIRECT; // should not cause TSAN failures as the showtime logging is synchronized
281234
check(2, 2, 0,

0 commit comments

Comments
 (0)