blob: cfea6251e533d12de397274bf3035f8b409ba753 [file] [log] [blame]
Roger McFarlanec92516502023-05-15 20:05:121// 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
8namespace base {
9
10TEST(HistogramSharedMemory, Default) {
11 HistogramSharedMemory default_constructed;
12 EXPECT_FALSE(default_constructed.IsValid());
13}
14
15TEST(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