aboutsummaryrefslogtreecommitdiffstats
path: root/src/tests/unit_ecdsa.cpp
diff options
context:
space:
mode:
authorDavid Carlier <[email protected]>2019-04-12 21:26:14 +0100
committerDavid Carlier <[email protected]>2019-04-12 22:12:42 +0100
commitf136bdf46b706980cf73ec7d9d3aa3c54089d392 (patch)
treedfe0435342f838882191f2857c5aba641eedaad0 /src/tests/unit_ecdsa.cpp
parent56977661a8509232a8307e8eab2e0b8636af3b43 (diff)
Using preprocessor for the tests
Diffstat (limited to 'src/tests/unit_ecdsa.cpp')
-rw-r--r--src/tests/unit_ecdsa.cpp13
1 files changed, 6 insertions, 7 deletions
diff --git a/src/tests/unit_ecdsa.cpp b/src/tests/unit_ecdsa.cpp
index 88c3a4d05..d87d54f5e 100644
--- a/src/tests/unit_ecdsa.cpp
+++ b/src/tests/unit_ecdsa.cpp
@@ -299,14 +299,13 @@ Test::Result test_encoding_options()
result.test_eq("Hybrid point same size as uncompressed",
enc_uncompressed.size(), enc_hybrid.size());
- if(Test::options().undefined_behavior_allowed())
- {
- auto invalid_format = static_cast<Botan::PointGFp::Compression_Type>(99);
+#if !defined(BOTAN_HAS_SANITIZER_UNDEFINED)
+ auto invalid_format = static_cast<Botan::PointGFp::Compression_Type>(99);
- result.test_throws("Invalid point format throws",
- "Invalid point encoding for EC_PublicKey",
- [&] { key.set_point_encoding(invalid_format); });
- }
+ result.test_throws("Invalid point format throws",
+ "Invalid point encoding for EC_PublicKey",
+ [&] { key.set_point_encoding(invalid_format); });
+#endif
return result;
}