Skip to content

Commit

Permalink
Test for WITH_BORINGSSL
Browse files Browse the repository at this point in the history
  • Loading branch information
RichLogan committed Jul 3, 2024
1 parent 0c627f1 commit f762db7
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 1 deletion.
2 changes: 1 addition & 1 deletion lib/hpke/test/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,4 @@ target_link_libraries(${TEST_APP_NAME} PRIVATE ${CURRENT_LIB_NAME}
Catch2::Catch2WithMain OpenSSL::Crypto)

# Enable CTest
catch_discover_tests(${TEST_APP_NAME})
catch_discover_tests(${TEST_APP_NAME} PROPERTIES SKIP_RETURN_CODE 4)
18 changes: 18 additions & 0 deletions lib/hpke/test/build.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
#include <catch2/catch_all.hpp>

TEST_CASE("BoringSSL Define")
{
#if defined(__has_include)
#if __has_include(<openssl/is_boringssl.h>)
#if defined(WITH_BORINGSSL)
REQUIRE(WITH_BORINGSSL);
#else
FAIL("Expect #WITH_BORINGSSL set when compiling with BoringSSL");
#endif
#else
SKIP("Only applicable to BoringSSL");
#endif
#else
SKIP("Cannot ensure BoringSSL without __has_include()");
#endif
}

0 comments on commit f762db7

Please sign in to comment.