Hash :
c853804c
Author :
Date :
2017-09-27T11:20:15
Add support for arrays of arrays to VariableLocation Array indices are sorted so that the outermost index is in the back. This is because we want to be consistent with future arrays of arrays parsing code. In parsing we'll have a utility function to make a TType object into an array, and there it's most natural to push the new outermost sizes to the back of the vector. Further patches will still be needed to parse arrays of arrays and add support to arrays of arrays into the API. BUG=angleproject:2125 TEST=angle_unittests, angle_end2end_tests Change-Id: I6c88edabf68ae9dbd803ec6d20543016c408b702 Reviewed-on: https://chromium-review.googlesource.com/686414 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Corentin Wallez <cwallez@chromium.org> Commit-Queue: Olli Etuaho <oetuaho@nvidia.com>
//
// Copyright (c) 2017 The ANGLE Project Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
//
// angleutils_unittest.cpp: Unit tests for ANGLE's common utilities.
#include "gtest/gtest.h"
#include "common/angleutils.h"
namespace
{
// Test that multiple array indices are written out in the right order.
TEST(ArrayIndexString, MultipleArrayIndices)
{
std::vector<unsigned int> indices;
indices.push_back(12);
indices.push_back(34);
indices.push_back(56);
EXPECT_EQ("[56][34][12]", ArrayIndexString(indices));
}
} // anonymous namespace