aboutsummaryrefslogtreecommitdiffstats
path: root/src/tests
diff options
context:
space:
mode:
authorJack Lloyd <[email protected]>2018-03-16 12:01:01 -0400
committerJack Lloyd <[email protected]>2018-03-16 12:01:01 -0400
commit6c8ffb4d2ee1f762804fc8d6a90a3d1761462503 (patch)
tree2b88c8d5a809cca03f3f66e6c1a053b1b7fa338a /src/tests
parentf787047f33d073036883b609d293656510ce8b16 (diff)
Catch exceptions by reference not value
Fixes a new warning in GCC 8
Diffstat (limited to 'src/tests')
-rw-r--r--src/tests/test_cryptobox.cpp4
-rw-r--r--src/tests/test_keywrap.cpp2
-rw-r--r--src/tests/test_utils.cpp2
3 files changed, 4 insertions, 4 deletions
diff --git a/src/tests/test_cryptobox.cpp b/src/tests/test_cryptobox.cpp
index 6d1d22314..5e7fcf08a 100644
--- a/src/tests/test_cryptobox.cpp
+++ b/src/tests/test_cryptobox.cpp
@@ -52,11 +52,11 @@ class Cryptobox_Tests final : public Test
Botan::CryptoBox::decrypt(corrupted, password);
result.test_failure("Decrypted corrupted cryptobox message");
}
- catch(Botan::Decoding_Error)
+ catch(Botan::Decoding_Error&)
{
result.test_success("Rejected corrupted cryptobox message");
}
- catch(Botan::Invalid_Argument)
+ catch(Botan::Invalid_Argument&)
{
result.test_success("Rejected corrupted cryptobox message");
}
diff --git a/src/tests/test_keywrap.cpp b/src/tests/test_keywrap.cpp
index a5b216562..de63d8067 100644
--- a/src/tests/test_keywrap.cpp
+++ b/src/tests/test_keywrap.cpp
@@ -160,7 +160,7 @@ class NIST_Keywrap_Invalid_Tests final : public Text_Based_Test
result.test_failure("Was able to unwrap invalid keywrap input");
}
- catch(Botan::Integrity_Failure)
+ catch(Botan::Integrity_Failure&)
{
result.test_success("Rejected invalid input");
}
diff --git a/src/tests/test_utils.cpp b/src/tests/test_utils.cpp
index c17acac57..5f3502eba 100644
--- a/src/tests/test_utils.cpp
+++ b/src/tests/test_utils.cpp
@@ -51,7 +51,7 @@ class Utility_Function_Tests final : public Text_Based_Test
Botan::round_up(x, 0);
result.test_failure("round_up did not reject invalid input");
}
- catch(std::exception) {}
+ catch(std::exception&) {}
}
else if(algo == "round_down")
{