Export media_cas_proxy_sdk
This commit is contained in:
31
util/error_space_test.cc
Normal file
31
util/error_space_test.cc
Normal file
@@ -0,0 +1,31 @@
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
// 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<Space1> {
|
||||
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
|
||||
Reference in New Issue
Block a user