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

//
// Copyright 2015 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.
//
// FragDepth_test.cpp:
//   Test for GLES SL 3.0 gl_FragDepth variable implementation.
//

#include "GLSLANG/ShaderLang.h"
#include "angle_gl.h"
#include "gtest/gtest.h"

namespace
{
const char ESSLVersion100[] =;
const char ESSLVersion300[] =;
const char EXTFDPragma[]    =;
}  // namespace

class FragDepthTest : public testing::TestWithParam<bool>
{};

// The GLES SL 3.0 built-in variable gl_FragDepth fails to compile with GLES SL 1.0.
TEST_P(FragDepthTest, CompileFailsESSL100)
{}

// The GLES SL 3.0 built-in variable gl_FragDepth compiles with GLES SL 3.0.
TEST_P(FragDepthTest, CompileSucceedsESSL300)
{}

// Using #extension GL_EXT_frag_depth in GLSL ES 3.0 shader fails to compile.
TEST_P(FragDepthTest, ExtensionFDFailsESSL300)
{}

// The tests should pass regardless whether the EXT_frag_depth is on or not.
INSTANTIATE_TEST_SUITE_P();