xref: /aosp_15_r20/external/angle/src/libANGLE/renderer/serial_utils_unittest.cpp (revision 8975f5c5ed3d1c378011245431ada316dfb6f244)
1 //
2 // Copyright 2019 The ANGLE Project Authors. All rights reserved.
3 // Use of this source code is governed by a BSD-style license that can be
4 // found in the LICENSE file.
5 //
6 // serial_utils_unittest:
7 //   Unit tests for the Serial utils.
8 //
9 
10 #include <gtest/gtest.h>
11 
12 #include "libANGLE/renderer/serial_utils.h"
13 
14 namespace rx
15 {
TEST(SerialTest,Monotonic)16 TEST(SerialTest, Monotonic)
17 {
18     AtomicSerialFactory factory;
19 
20     Serial a = factory.generate();
21     Serial b = factory.generate();
22 
23     EXPECT_GT(b, a);
24 
25     Serial zero;
26 
27     EXPECT_GT(a, zero);
28     EXPECT_GT(b, zero);
29 }
30 }  // namespace rx
31