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

//
// Copyright 2016 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.
//
// QualificationOrder_test.cpp:
//   OpenGL ES 3.1 removes the strict order of qualifiers imposed by the grammar.
//   This file contains tests for invalid order and usage of qualifiers.

#include "tests/test_utils/ShaderCompileTreeTest.h"

usingnamespacesh;

class QualificationOrderFragmentShaderTest : public ShaderCompileTreeTest
{};

class QualificationOrderVertexShaderTest : public QualificationOrderFragmentShaderTest
{};

// Repeating centroid qualifier is invalid.
TEST_F(QualificationOrderFragmentShaderTest, RepeatingCentroid)
{}

// Repeating uniform storage qualifiers is invalid.
TEST_F(QualificationOrderFragmentShaderTest, RepeatingUniforms)
{}

// Repeating varying storage qualifiers is invalid.
TEST_F(QualificationOrderFragmentShaderTest, RepeatingVaryings)
{}

// Layout qualifier should be before the storage qualifiers.
TEST_F(QualificationOrderFragmentShaderTest, WrongOrderQualifiers)
{}

// Centroid out is the correct order. Out centroid is incorrect.
TEST_F(QualificationOrderVertexShaderTest, WrongOrderCentroidOut)
{}

// Centroid in is the correct order. In centroid is incorrect.
TEST_F(QualificationOrderFragmentShaderTest, WrongOrderCentroidIn)
{}

// Type cannot be before the storage qualifier.
TEST_F(QualificationOrderFragmentShaderTest, WrongOrderTypeStorage)
{}

// A variable cannot have two conflicting storage qualifiers.
TEST_F(QualificationOrderFragmentShaderTest, RepeatingDifferentStorageQualifiers)
{}

// A variable cannot have two different layout qualifiers.
TEST_F(QualificationOrderFragmentShaderTest, RepeatingLayoutQualifiers)
{}

// A variable cannot have repeating invariant qualifiers.
TEST_F(QualificationOrderFragmentShaderTest, RepeatingInvariantQualifiers)
{}

// A variable cannot have repeating storage qualifiers.
TEST_F(QualificationOrderVertexShaderTest, RepeatingAttributes)
{}

// Wrong order for invariant varying. It should be 'invariant varying', not 'varying invariant'.
TEST_F(QualificationOrderVertexShaderTest, VaryingInvariantWrongOrder)
{}

// A variable cannot have repeating storage qualifiers.
TEST_F(QualificationOrderVertexShaderTest, AttributeVaryingMix)
{}

// A variable cannot have repeating storage qualifiers.
TEST_F(QualificationOrderVertexShaderTest, VaryingAttributeMix)
{}

// A variable cannot have repeating interpolation qualifiers.
TEST_F(QualificationOrderVertexShaderTest, RepeatingInterpolationQualifiers)
{}

// Wrong order for the interpolation and storage qualifier. The correct order is interpolation
// qualifier and then storage qualifier.
TEST_F(QualificationOrderVertexShaderTest, WrongOrderInterpolationStorageQualifiers)
{}

// The correct order is invariant, interpolation, storage.
TEST_F(QualificationOrderVertexShaderTest, WrongOrderInvariantInterpolationStorageQualifiers)
{}

// The invariant qualifer has to be before the storage qualifiers.
TEST_F(QualificationOrderVertexShaderTest, WrongOrderInvariantNotFirst)
{}

// The precision qualifier is after the storage qualifiers.
TEST_F(QualificationOrderVertexShaderTest, WrongOrderPrecision)
{}

// A variable cannot have multiple declarations of the 'in' storage qualifier.
TEST_F(QualificationOrderVertexShaderTest, RepeatingInQualifier)
{}

// A variable cannot have multiple declarations of the 'attribute' storage qualifier.
TEST_F(QualificationOrderVertexShaderTest, RepeatingAttributeQualifier)
{}

// Vertex input cannot be qualified with invariant.
TEST_F(QualificationOrderVertexShaderTest, InvariantVertexInput)
{}

// Cannot have a function parameter with the invariant qualifier.
TEST_F(QualificationOrderFragmentShaderTest, InvalidFunctionParametersInvariant)
{}

// Cannot have a function parameter with the attribute qualifier.
TEST_F(QualificationOrderFragmentShaderTest, InvalidFunctionParametersAttribute)
{}

// Cannot have a function parameter with the varying qualifier.
TEST_F(QualificationOrderFragmentShaderTest, InvalidFunctionParametersVarying)
{}

// Cannot have a function parameter with the layout qualifier
TEST_F(QualificationOrderFragmentShaderTest, InvalidFunctionParametersLayout)
{}

// Cannot have a function parameter with the centroid qualifier
TEST_F(QualificationOrderFragmentShaderTest, InvalidFunctionParametersCentroidIn)
{}

// Cannot have a function parameter with the flat qualifier
TEST_F(QualificationOrderFragmentShaderTest, InvalidFunctionParametersFlatIn)
{}

// Output layout location qualifier can't appear more than once within a declaration.
// GLSL ES 3.00.6 section 4.3.8.2 Output Layout Qualifiers.
TEST_F(QualificationOrderFragmentShaderTest, TwoOutputLocations)
{}