Files
media_cas_proxy_sdk_source/util/random/global_id_test.cc
2018-12-11 10:51:52 -08:00

28 lines
767 B
C++

////////////////////////////////////////////////////////////////////////////////
// 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/random/global_id.h"
#include "glog/logging.h"
#include "testing/gunit.h"
namespace widevine {
namespace util {
namespace random {
TEST(GlobalIDTest, NewGlobalID) {
uint64_t id = NewGlobalID();
LOG(INFO) << "NewGlobalID " << id;
EXPECT_EQ(id + 1, NewGlobalID());
EXPECT_EQ(id + 2, NewGlobalID());
}
} // namespace random
} // namespace util
} // namespace widevine