chromium/gpu/command_buffer/service/shader_translator_unittest.cc

// Copyright 2012 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#include "gpu/command_buffer/service/shader_translator.h"

#include "base/containers/contains.h"
#include "build/build_config.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "ui/gl/gl_bindings.h"

namespace gpu {
namespace gles2 {

class ShaderTranslatorTest : public testing::Test {};

class ES3ShaderTranslatorTest : public testing::Test {};

TEST_F(ShaderTranslatorTest, ValidVertexShader) {}

TEST_F(ShaderTranslatorTest, InvalidVertexShader) {}

TEST_F(ShaderTranslatorTest, ValidFragmentShader) {}

TEST_F(ShaderTranslatorTest, InvalidFragmentShader) {}

TEST_F(ShaderTranslatorTest, GetAttributes) {}

TEST_F(ShaderTranslatorTest, GetUniforms) {}


TEST_F(ES3ShaderTranslatorTest, InvalidInterfaceBlocks) {}

TEST_F(ES3ShaderTranslatorTest, GetInterfaceBlocks) {}

TEST_F(ShaderTranslatorTest, OptionsString) {}

class ShaderTranslatorOutputVersionTest
    : public testing::TestWithParam<testing::tuple<const char*, const char*>> {};

// crbug.com/540543
// https://bugs.chromium.org/p/angleproject/issues/detail?id=1276
// https://bugs.chromium.org/p/angleproject/issues/detail?id=1277
TEST_F(ShaderTranslatorOutputVersionTest, DISABLED_CompatibilityOutput) {}

TEST_P(ShaderTranslatorOutputVersionTest, HasCorrectOutputGLSLVersion) {}

// For some compilers, using make_tuple("a", "bb") would end up
// instantiating make_tuple<char[1], char[2]>. This does not work.
namespace {
testing::tuple<const char*, const char*> make_gl_glsl_tuple(
    const char* gl_version,
    const char* glsl_version_directive) {}
}

// Test data for the above test. Check that for the OpenGL ES output
// contexts, the shader is such that GLSL 1.0 is used. The translator
// selects GLSL 1.0 by not output any version at the moment, though we
// do not know if that would be correct for the future OpenGL ES specs.
INSTANTIATE_TEST_SUITE_P();

}  // namespace gles2
}  // namespace gpu