diff options
author | Jack Lloyd <[email protected]> | 2018-03-31 10:10:38 -0400 |
---|---|---|
committer | Jack Lloyd <[email protected]> | 2018-03-31 10:10:38 -0400 |
commit | 07f70fafc38ef0956d4cd9176d6f8c578aedd07e (patch) | |
tree | 342b35c5392ceecb6f2d765958b32e2b1a63543d /src/tests/test_dl_group.cpp | |
parent | bdf71b1f83e227f104f39fcf472ebaa155d98cf1 (diff) |
Add --avoid-undefined option
GH #1518
Diffstat (limited to 'src/tests/test_dl_group.cpp')
-rw-r--r-- | src/tests/test_dl_group.cpp | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/src/tests/test_dl_group.cpp b/src/tests/test_dl_group.cpp index 2644d5e1a..10a7e3bc6 100644 --- a/src/tests/test_dl_group.cpp +++ b/src/tests/test_dl_group.cpp @@ -44,12 +44,15 @@ class DL_Group_Tests final : public Test "DL_Group uninitialized", []() { Botan::DL_Group dl; dl.get_p(); }); - result.test_throws("Bad generator param", - "Invalid argument DL_Group unknown PrimeType", - []() { - auto invalid_type = static_cast<Botan::DL_Group::PrimeType>(9); - Botan::DL_Group dl(Test::rng(), invalid_type, 1024); - }); + if(Test::avoid_undefined_behavior() == false) + { + result.test_throws("Bad generator param", + "Invalid argument DL_Group unknown PrimeType", + []() { + auto invalid_type = static_cast<Botan::DL_Group::PrimeType>(9); + Botan::DL_Group dl(Test::rng(), invalid_type, 1024); + }); + } return result; } |