chromium/third_party/angle/src/tests/compiler_tests/Parse_test.cpp

//
// Copyright 2024 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.
//
// Parse_test.cpp:
//   Test for parsing erroneous and correct GLSL input.
//

#include <memory>
#include "GLSLANG/ShaderLang.h"
#include "angle_gl.h"
#include "compiler/translator/glsl/TranslatorESSL.h"
#include "gtest/gtest.h"

usingnamespacesh;

class ParseTest : public testing::Test
{};

TEST_F(ParseTest, UnsizedArrayConstructorNoCrash)
{}

TEST_F(ParseTest, UniformBlockNameReferenceNoCrash)
{}

TEST_F(ParseTest, Precise320NoCrash)
{}

// Tests that layout(index=0) is parsed in es 100 shaders if an extension like
// EXT_shader_framebuffer_fetch is enabled, but this does not cause a crash.
TEST_F(ParseTest, ShaderFramebufferFetchLayoutIndexNoCrash)
{}

TEST_F(ParseTest, Radians320NoCrash)
{}

TEST_F(ParseTest, CoherentCoherentNoCrash)
{}

TEST_F(ParseTest, LargeArrayIndexNoCrash)
{}

// Tests that separating variable declaration of multiple instances of a anonymous structure
// rewrites the expression types for expressions that use the variables. At the time of writing
// the expression types were left referencing the original anonymous function.
TEST_F(ParseTest, SeparateAnonymousFunctionsRewritesExpressions)
{}

// Tests that constant folding a division of a void variable does not crash during parsing.
TEST_F(ParseTest, ConstStructWithVoidAndDivNoCrash)
{}

// Tests that division of void variable returns the same errors as division of constant
// void variable (see above).
TEST_F(ParseTest, StructWithVoidAndDivErrorCheck)
{}

// Tests that usage of BuildIn struct type name does not crash during parsing.
TEST_F(ParseTest, BuildInStructTypeNameDeclarationNoCrash)
{}

TEST_F(ParseTest, BuildInStructTypeNameFunctionArgumentNoCrash)
{}

TEST_F(ParseTest, BuildInStructTypeNameFunctionReturnValueNoCrash)
{}

// Tests that imod of const void variable does not crash during parsing.
TEST_F(ParseTest, ConstStructVoidAndImodAndNoCrash)
{}

TEST_F(ParseTest, HugeUnsizedMultidimensionalArrayConstructorNoCrash)
{}

TEST_F(ParseTest, HugeMultidimensionalArrayConstructorNoCrash)
{}

TEST_F(ParseTest, DeeplyNestedWhileStatementsNoCrash)
{}

TEST_F(ParseTest, DeeplyNestedForStatementsNoCrash)
{}

TEST_F(ParseTest, DeeplyNestedDoWhileStatementsNoCrash)
{}

TEST_F(ParseTest, DeeplyNestedSwitchStatementsNoCrash)
{}

TEST_F(ParseTest, ManyChainedUnaryExpressionsNoCrash)
{}

TEST_F(ParseTest, ManyChainedAssignmentsNoCrash)
{}