Server IP : 192.64.118.117 / Your IP : 18.119.122.164 Web Server : LiteSpeed System : Linux premium56.web-hosting.com 4.18.0-513.24.1.lve.1.el8.x86_64 #1 SMP Thu May 9 15:10:09 UTC 2024 x86_64 User : thecgapy ( 1160) PHP Version : 7.4.33 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : OFF | Pkexec : OFF Directory : /opt/cpanel/ea-ruby27/src/passenger-release-6.0.23/test/cxx/ |
Upload File : |
#include <TestSupport.h> #include <modp_b64.h> using namespace Passenger; using namespace modp; using namespace std; namespace tut { struct Base64DecodingTest: public TestBase { string decode(const char* base64string){ return b64_decode(base64string); } }; DEFINE_TEST_GROUP(Base64DecodingTest); /***** Valid base64 *****/ TEST_METHOD(1) { ensure_equals(decode(""),""); } TEST_METHOD(2) { ensure_equals(decode("YQ=="),"a"); } TEST_METHOD(3) { ensure_equals(decode("YWI="),"ab"); } TEST_METHOD(4) { ensure_equals(decode("YWJj"),"abc"); } TEST_METHOD(5) { ensure_equals(decode("VGhpcyBpcyBhIHRlc3Qgb2YgYSBsb25nZXIgc3RyaW5nLg=="),"This is a test of a longer string."); } }