• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 // Copyright 2023 The Chromium Authors
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4 
5 #include "base/metrics/histogram_shared_memory.h"
6 #include "testing/gtest/include/gtest/gtest.h"
7 
8 namespace base {
9 
TEST(HistogramSharedMemory,Default)10 TEST(HistogramSharedMemory, Default) {
11   HistogramSharedMemory default_constructed;
12   EXPECT_FALSE(default_constructed.IsValid());
13 }
14 
TEST(HistogramSharedMemory,Create)15 TEST(HistogramSharedMemory, Create) {
16   auto memory = HistogramSharedMemory::Create(1234, {"Test", 1 << 20});
17   ASSERT_TRUE(memory.has_value());
18   EXPECT_TRUE(memory->IsValid());
19 }
20 
21 }  // namespace base
22