Files
media_cas_packager_sdk_source/util/endian/endian_test.cc
Lu Chen 62777d7d3b Support for group license
Content keys in ECM v3 can now additionally be encrypted by group
entitlement keys.
2021-03-04 14:35:08 -08:00

24 lines
775 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 <cstdint>
#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