//////////////////////////////////////////////////////////////////////////////// // Copyright 2017 Google LLC. // // This software is licensed under the terms defined in the Widevine Master // License Agreement. For a copy of this agreement, please contact // widevine-licensing@google.com. //////////////////////////////////////////////////////////////////////////////// #include "util/error_space.h" #include "testing/gunit.h" namespace widevine { namespace util { namespace { class Space1 : public util::ErrorSpaceImpl { public: static std::string SpaceName() { return "Space1"; } static std::string CodeToString(int code) { return "Test" + std::to_string(code); } }; TEST(ErrorSpaceTest, Basic) { const ErrorSpace* space1 = Space1::Get(); EXPECT_EQ("Space1", space1->SpaceName()); EXPECT_EQ(Space1::CodeToString(23), space1->String(23)); } } // namespace } // namespace util } // namespace widevine