Skip to content

Commit ac3773a

Browse files
authored
TEST/GTEST: Fix error counting in test (#10851)
1 parent 8d4f43e commit ac3773a

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

test/gtest/common/test.cc

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -314,11 +314,6 @@ unsigned test_base::num_warnings()
314314
}
315315

316316
void test_base::SetUpProxy() {
317-
if (m_state == SKIPPED) {
318-
return;
319-
}
320-
321-
ucs_assert(m_state == NEW);
322317
m_num_valgrind_errors_before = VALGRIND_COUNT_ERRORS;
323318
m_num_warnings_before = m_total_warnings;
324319
m_num_errors_before = m_total_errors;
@@ -327,8 +322,14 @@ void test_base::SetUpProxy() {
327322
m_warnings.clear();
328323
m_first_warns_and_errors.clear();
329324
m_num_log_handlers_before = ucs_log_num_handlers();
325+
330326
ucs_log_push_handler(count_warns_logger);
331327

328+
if (m_state == SKIPPED) {
329+
return;
330+
}
331+
332+
ucs_assert(m_state == NEW);
332333
try {
333334
check_skip_test();
334335
m_state = INITIALIZING;

0 commit comments

Comments
 (0)