Skip to content

Isolate utility tests#1090

Merged
gittiver merged 3 commits into
CrowCpp:masterfrom
nicholashanson:refactor/isolate_utility_tests
Sep 17, 2025
Merged

Isolate utility tests#1090
gittiver merged 3 commits into
CrowCpp:masterfrom
nicholashanson:refactor/isolate_utility_tests

Conversation

@nicholashanson

Copy link
Copy Markdown
Contributor

Continued unittest.cpp refactoring by moving the six tests that depend only on the utility module into a separate test_utility.cpp.

Before refactor:

Filters: "base64","normalize_path","sanitize_filename","trim","string_equals","lexical_cast"
Randomness seeded to: 1289970712
===============================================================================
All tests passed (58 assertions in 6 test cases)

After refactor:

Filters: "base64","normalize_path","sanitize_filename","trim","string_equals","lexical_cast"
Randomness seeded to: 1628700200
===============================================================================
All tests passed (58 assertions in 6 test cases)

- Moved tests that depend solely on `crow::response` from unittest.cpp
  to tests/unit_tests/test_http_response.cpp for clearer separation of concerns.
- Renamed the original "simple_response_routing_params" test in
  unittest.cpp to "routing_params" to reflect this chage.
- Updated CMakeLists.txt to automatically include all sources under unit_tests/.
Isolated unit tests that depend only on the utility module into test_utility.cpp.

@gittiver gittiver left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please replace globbing by explicit file listing

Comment thread tests/CMakeLists.txt Outdated
@gittiver
gittiver merged commit b818246 into CrowCpp:master Sep 17, 2025
19 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants