diff options
Diffstat (limited to 'src/tests')
-rw-r--r-- | src/tests/test_octetstring.cpp | 6 | ||||
-rw-r--r-- | src/tests/test_oid.cpp | 4 | ||||
-rw-r--r-- | src/tests/tests.cpp | 4 | ||||
-rw-r--r-- | src/tests/unit_ecdh.cpp | 2 |
4 files changed, 8 insertions, 8 deletions
diff --git a/src/tests/test_octetstring.cpp b/src/tests/test_octetstring.cpp index b9692559e..3b0fd11f4 100644 --- a/src/tests/test_octetstring.cpp +++ b/src/tests/test_octetstring.cpp @@ -60,12 +60,12 @@ Test::Result test_odd_parity() return result; } -Test::Result test_as_string() +Test::Result test_to_string() { Test::Result result("OctetString"); Botan::OctetString os("0123456789ABCDEF"); - result.test_eq("OctetString::as_string() returns correct string", os.as_string(), "0123456789ABCDEF"); + result.test_eq("OctetString::to_string() returns correct string", os.to_string(), "0123456789ABCDEF"); return result; } @@ -139,7 +139,7 @@ class OctetString_Tests final : public Test test_from_hex, test_from_byte, test_odd_parity, - test_as_string, + test_to_string, test_xor, test_equality, test_append diff --git a/src/tests/test_oid.cpp b/src/tests/test_oid.cpp index 131966c2a..42da391e0 100644 --- a/src/tests/test_oid.cpp +++ b/src/tests/test_oid.cpp @@ -54,14 +54,14 @@ Test::Result test_add_and_lookup() result.test_eq("OIDS::lookup returns empty string for non-existent OID object", Botan::OIDS::lookup(Botan::OID("1.2.345.6.888")), std::string()); - result.test_eq("OIDS::lookup returns empty OID for non-existent OID name", Botan::OIDS::lookup("botan-test-oid3").as_string(), Botan::OID().as_string()); + result.test_eq("OIDS::lookup returns empty OID for non-existent OID name", Botan::OIDS::lookup("botan-test-oid3").to_string(), Botan::OID().to_string()); // add oid -> string mapping Botan::OIDS::add_oid2str(Botan::OID("1.2.345.6.888"), "botan-test-oid3"); result.test_eq("", Botan::OIDS::lookup(Botan::OID("1.2.345.6.888")), "botan-test-oid3"); // still returns empty OID - result.test_eq("OIDS::lookup still returns empty OID without adding name mapping", Botan::OIDS::lookup("botan-test-oid3").as_string(), Botan::OID().as_string()); + result.test_eq("OIDS::lookup still returns empty OID without adding name mapping", Botan::OIDS::lookup("botan-test-oid3").to_string(), Botan::OID().to_string()); // add string -> oid mapping Botan::OIDS::add_str2oid(Botan::OID("1.2.345.6.888"), "botan-test-oid3"); diff --git a/src/tests/tests.cpp b/src/tests/tests.cpp index 537c27b3e..8e21a8d38 100644 --- a/src/tests/tests.cpp +++ b/src/tests/tests.cpp @@ -253,12 +253,12 @@ bool Test::Result::test_eq(const std::string& what, if(produced == expected) { - out << " produced expected result " << produced.as_string(); + out << " produced expected result " << produced.to_string(); return test_success(out.str()); } else { - out << " produced unexpected result '" << produced.as_string() << "' expected '" << expected.as_string() << "'"; + out << " produced unexpected result '" << produced.to_string() << "' expected '" << expected.to_string() << "'"; return test_failure(out.str()); } } diff --git a/src/tests/unit_ecdh.cpp b/src/tests/unit_ecdh.cpp index f7fc475b7..6e601f3d9 100644 --- a/src/tests/unit_ecdh.cpp +++ b/src/tests/unit_ecdh.cpp @@ -54,7 +54,7 @@ class ECDH_Unit_Tests final : public Test if(!result.test_eq("same derived key", alice_key.bits_of(), bob_key.bits_of())) { - result.test_note("Keys where " + alice_key.as_string() + " and " + bob_key.as_string()); + result.test_note("Keys where " + alice_key.to_string() + " and " + bob_key.to_string()); } } catch(Botan::Lookup_Error& e) |