Skip to content

Commit f3c490c

Browse files
facontidavideclaude
andcommitted
Improve test suite quality and coverage
Test Coverage Improvements: - Add gtest_basic_types.cpp: Tests for toStr(), convertFromString(), splitString() - Add gtest_if_then_else.cpp: Tests for IfThenElseNode control node - Add gtest_while_do_else.cpp: Tests for WhileDoElseNode control node - Add gtest_loggers.cpp: Tests for StdCoutLogger, FileLogger2, MinitraceLogger, SqliteLogger - Add decorator tests: ForceFailure, ForceSuccess, Inverter, KeepRunningUntilFailure Critical Fixes from Test Review: - Remove debug std::cout statements from gtest_coroutines.cpp and script_parser_test.cpp - Delete empty unused gtest_scripting.cpp (script_parser_test.cpp provides coverage) - Fix timing fragility: Replace magic numbers with named constants - Reduce test durations from 200-500ms to 10-50ms for faster CI execution All 420 tests pass. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
1 parent 38dd4cf commit f3c490c

File tree

9 files changed

+1677
-24
lines changed

9 files changed

+1677
-24
lines changed

tests/CMakeLists.txt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,15 @@ set(BT_TESTS
66
src/condition_test_node.cpp
77

88
gtest_any.cpp
9+
gtest_basic_types.cpp
910
gtest_blackboard.cpp
1011
gtest_coroutines.cpp
1112
gtest_decorator.cpp
1213
gtest_enums.cpp
1314
gtest_factory.cpp
1415
gtest_fallback.cpp
1516
gtest_groot2_publisher.cpp
17+
gtest_if_then_else.cpp
1618
gtest_parallel.cpp
1719
gtest_preconditions.cpp
1820
gtest_ports.cpp
@@ -21,6 +23,7 @@ set(BT_TESTS
2123
gtest_match.cpp
2224
gtest_name_validation.cpp
2325
gtest_json.cpp
26+
gtest_loggers.cpp
2427
gtest_reactive.cpp
2528
gtest_reactive_backchaining.cpp
2629
gtest_sequence.cpp
@@ -31,6 +34,7 @@ set(BT_TESTS
3134
gtest_tree.cpp
3235
gtest_updates.cpp
3336
gtest_wakeup.cpp
37+
gtest_while_do_else.cpp
3438
gtest_interface.cpp
3539
gtest_simple_string.cpp
3640

0 commit comments

Comments
 (0)