JosiahWI commented on code in PR #10283:
URL: https://github.com/apache/trafficserver/pull/10283#discussion_r1306165984
##########
proxy/hdrs/unit_tests/test_Huffmancode.cc:
##########
@@ -88,13 +89,20 @@ random_test()
free(dst_start);
}
+TEST_CASE("Huffmancode Random", "[proxy][huffman]")
+{
+ // This doesn't check anything ...
Review Comment:
Then why does it exist?
##########
CMakeLists.txt:
##########
@@ -307,6 +307,9 @@ endif()
# Catch2 for tests
set(CATCH_INCLUDE_DIR ${CMAKE_SOURCE_DIR}/lib/catch2)
+add_library(catch::catch INTERFACE IMPORTED)
+target_include_directories(catch::catch INTERFACE ${CMAKE_SOURCE_DIR}/include
${CATCH_INCLUDE_DIR})
Review Comment:
I thought there was already a target? `catch2::catch2` maybe? Their own
official target last I checked is `Catch2::Catch2WithMain`, which we don't use
(but maybe should for consistency).
##########
proxy/hdrs/CMakeLists.txt:
##########
@@ -46,3 +46,26 @@ target_link_libraries(hdrs
PRIVATE
ts::inkevent
)
+
+add_executable(test_proxy_hdrs
+ unit_tests/test_HdrHeap.cc
+ unit_tests/test_Hdrs.cc
+ unit_tests/test_HdrUtils.cc
+ unit_tests/test_HdrHeap.cc
+ unit_tests/test_HeaderValidator.cc
+ unit_tests/test_Huffmancode.cc
+ unit_tests/test_mime.cc
+ unit_tests/test_URL.cc
+ unit_tests/unit_test_main.cc
+)
+target_link_libraries(test_proxy_hdrs PRIVATE ts::hdrs ts::tscore ts::inkevent
catch::catch)
+add_test(NAME test_proxy_hdrs COMMAND $<TARGET_FILE:test_proxy_hdrs>)
Review Comment:
Is the generator expression necessary? My understanding of the `add_test`
docs was that if the command is the name of a target, it automatically uses
that targets binary output.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]