FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

GitHub Viewer

#include "UnitTest++/UnitTestPP.h" #include "UnitTest++/MemoryOutStream.h" #include #include #include #include using namespace UnitTest; using namespace std; namespace { const char* maxSignedIntegralStr(size_t nBytes) { switch(nBytes) { case 8: return "9223372036854775807"; case 4: return "2147483647"; case 2: return "32767"; case 1: return "127"; default: return "Unsupported signed integral size"; } } const char* minSignedIntegralStr(size_t nBytes) { switch(nBytes) { case 8: return "-9223372036854775808"; case 4: return "-2147483648"; case 2: return "-32768"; case 1: return "-128"; default: return "Unsupported signed integral size"; } } const char* maxUnsignedIntegralStr(size_t nBytes) { switch(nBytes) { case 8: return "18446744073709551615"; case 4: return "4294967295"; case 2: return "65535"; case 1: return "255"; default: return "Unsupported signed integral size"; } } TEST(DefaultIsEmptyString) { MemoryOutStream const stream; CHECK(stream.GetText() != 0); CHECK_EQUAL("", stream.GetText()); } TEST(StreamingTextCopiesCharacters) { MemoryOutStream stream; stream

Back | FazBrowse Home | New Git URL