22 lines
755 B
C++
22 lines
755 B
C++
////////////////////////////////////////////////////////////////////////////////
|
|
// Copyright 2020 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/endian/endian.h"
|
|
|
|
#include "testing/gmock.h"
|
|
#include "testing/gunit.h"
|
|
#include "absl/strings/escaping.h"
|
|
|
|
TEST(BigEndian, Load32) {
|
|
const char value[] = "000000c8";
|
|
EXPECT_EQ(static_cast<uint32_t>(0xC8),
|
|
widevine::BigEndian::Load32(
|
|
absl::HexStringToBytes(std::string(value)).data()));
|
|
}
|
|
|
|
namespace widevine {} // namespace widevine
|