blob: 0173e36437c55e32bd5ff75778da04ada52b3766 [file] [log] [blame]
// Copyright 2023 The Fuchsia Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "src/graphics/display/lib/api-types-cpp/driver-layer-id.h"
#include <cstdint>
#include <gtest/gtest.h>
namespace display {
namespace {
constexpr DriverLayerId kOne(1);
constexpr DriverLayerId kAnotherOne(1);
constexpr DriverLayerId kTwo(2);
TEST(DriverLayerIdTest, EqualityIsReflexive) {
EXPECT_EQ(kOne, kOne);
EXPECT_EQ(kAnotherOne, kAnotherOne);
EXPECT_EQ(kTwo, kTwo);
}
TEST(DriverLayerIdTest, EqualityIsSymmetric) {
EXPECT_EQ(kOne, kAnotherOne);
EXPECT_EQ(kAnotherOne, kOne);
}
TEST(DriverLayerIdTest, EqualityForDifferentValues) {
EXPECT_NE(kOne, kTwo);
EXPECT_NE(kAnotherOne, kTwo);
EXPECT_NE(kTwo, kOne);
EXPECT_NE(kTwo, kAnotherOne);
}
} // namespace
} // namespace display