Path: blob/main_old/src/tests/compiler_tests/GLSLCompatibilityOutput_test.cpp
1693 views
//1// Copyright 2016 The ANGLE Project Authors. All rights reserved.2// Use of this source code is governed by a BSD-style license that can be3// found in the LICENSE file.4//5// GLSLCompatibilityOutputTest.cpp6// Test compiler output for glsl compatibility mode7//89#include "GLSLANG/ShaderLang.h"10#include "angle_gl.h"11#include "gtest/gtest.h"12#include "tests/test_utils/compiler_test.h"1314using namespace sh;1516class GLSLCompatibilityOutputTest : public MatchOutputCodeTest17{18public:19GLSLCompatibilityOutputTest()20: MatchOutputCodeTest(GL_VERTEX_SHADER, SH_VARIABLES, SH_GLSL_COMPATIBILITY_OUTPUT)21{}22};2324// Verify gl_Position is written when compiling in compatibility mode25TEST_F(GLSLCompatibilityOutputTest, GLPositionWrittenTest)26{27const std::string &shaderString =28"precision mediump float;\n"29"void main() {\n"30"}";31compile(shaderString);32EXPECT_TRUE(foundInCode("gl_Position"));33}343536