xref: /aosp_15_r20/external/angle/src/common/angleutils_unittest.cpp (revision 8975f5c5ed3d1c378011245431ada316dfb6f244)
1 //
2 // Copyright 2017 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 
7 // angleutils_unittest.cpp: Unit tests for ANGLE's common utilities.
8 
9 #include "gtest/gtest.h"
10 
11 #include "common/angleutils.h"
12 
13 namespace
14 {
15 
16 // Test that multiple array indices are written out in the right order.
TEST(ArrayIndexString,MultipleArrayIndices)17 TEST(ArrayIndexString, MultipleArrayIndices)
18 {
19     std::vector<unsigned int> indices;
20     indices.push_back(12);
21     indices.push_back(34);
22     indices.push_back(56);
23     EXPECT_EQ("[56][34][12]", ArrayIndexString(indices));
24 }
25 
26 }  // anonymous namespace
27