diff options
author | David Carlier <[email protected]> | 2019-04-12 21:26:14 +0100 |
---|---|---|
committer | David Carlier <[email protected]> | 2019-04-12 22:12:42 +0100 |
commit | f136bdf46b706980cf73ec7d9d3aa3c54089d392 (patch) | |
tree | dfe0435342f838882191f2857c5aba641eedaad0 /src/tests/test_ffi.cpp | |
parent | 56977661a8509232a8307e8eab2e0b8636af3b43 (diff) |
Using preprocessor for the tests
Diffstat (limited to 'src/tests/test_ffi.cpp')
-rw-r--r-- | src/tests/test_ffi.cpp | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/src/tests/test_ffi.cpp b/src/tests/test_ffi.cpp index de429bde9..696a70377 100644 --- a/src/tests/test_ffi.cpp +++ b/src/tests/test_ffi.cpp @@ -1103,14 +1103,13 @@ class FFI_Unit_Tests final : public Test // delete of null is ok/ignored TEST_FFI_RC(0, botan_hash_destroy, (nullptr)); - if(Test::options().undefined_behavior_allowed()) - { - // Confirm that botan_x_destroy checks the argument type - botan_mp_t mp; - botan_mp_init(&mp); - TEST_FFI_RC(BOTAN_FFI_ERROR_INVALID_OBJECT, botan_hash_destroy, (reinterpret_cast<botan_hash_t>(mp))); - TEST_FFI_RC(0, botan_mp_destroy, (mp)); - } +#if !defined(BOTAN_HAS_SANITIZER_UNDEFINED) + // Confirm that botan_x_destroy checks the argument type + botan_mp_t mp; + botan_mp_init(&mp); + TEST_FFI_RC(BOTAN_FFI_ERROR_INVALID_OBJECT, botan_hash_destroy, (reinterpret_cast<botan_hash_t>(mp))); + TEST_FFI_RC(0, botan_mp_destroy, (mp)); +#endif std::set<std::string> errors; for(int i = -100; i != 50; ++i) |