From 6b104a49245450d5ba7cca05d9528295d1a3ce96 Mon Sep 17 00:00:00 2001 From: Hector Espert Date: Tue, 12 Jan 2021 18:28:13 +0100 Subject: [PATCH] Add lib_base64 testcases --- tests/unit-tests/lib/test_base64.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/tests/unit-tests/lib/test_base64.cpp b/tests/unit-tests/lib/test_base64.cpp index de8c872632..8bd84960d1 100644 --- a/tests/unit-tests/lib/test_base64.cpp +++ b/tests/unit-tests/lib/test_base64.cpp @@ -55,10 +55,18 @@ namespace test_base64 { TEST_F(test_base64, r_base64_encode) { EXPECT_EQ(r_base64_encode("Boinc"), "Qm9pbmM="); + EXPECT_EQ(r_base64_encode("B o i n c"), "QiBvIGkgbiBj"); + EXPECT_EQ(r_base64_encode("Bòíncüñ"), "QsOyw61uY8O8w7E="); + EXPECT_EQ(r_base64_encode("äöüß"), "w6TDtsO8w58="); + EXPECT_EQ(r_base64_encode("new\nline"), "bmV3CmxpbmU="); } TEST_F(test_base64, r_base64_decode) { EXPECT_EQ(r_base64_decode("Qm9pbmM="), "Boinc"); + EXPECT_EQ(r_base64_decode("QiBvIGkgbiBj"), "B o i n c"); + EXPECT_EQ(r_base64_decode("QsOyw61uY8O8w7E="), "Bòíncüñ"); + EXPECT_EQ(r_base64_decode("w6TDtsO8w58="), "äöüß"); + EXPECT_EQ(r_base64_decode("bmV3CmxpbmU="), "new\nline"); }