chromium/third_party/dawn/src/tint/lang/glsl/writer/type_test.cc

// Copyright 2024 The Dawn & Tint Authors
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are met:
//
// 1. Redistributions of source code must retain the above copyright notice, this
//    list of conditions and the following disclaimer.
//
// 2. Redistributions in binary form must reproduce the above copyright notice,
//    this list of conditions and the following disclaimer in the documentation
//    and/or other materials provided with the distribution.
//
// 3. Neither the name of the copyright holder nor the names of its
//    contributors may be used to endorse or promote products derived from
//    this software without specific prior written permission.
//
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

#include "gmock/gmock.h"

#include "src/tint/lang/core/type/array.h"
#include "src/tint/lang/core/type/depth_multisampled_texture.h"
#include "src/tint/lang/core/type/depth_texture.h"
#include "src/tint/lang/core/type/matrix.h"
#include "src/tint/lang/core/type/multisampled_texture.h"
#include "src/tint/lang/core/type/sampled_texture.h"
#include "src/tint/lang/core/type/storage_texture.h"
#include "src/tint/lang/core/type/struct.h"
#include "src/tint/lang/glsl/writer/helper_test.h"
#include "src/tint/utils/text/string.h"

namespace tint::glsl::writer {
namespace {

usingnamespacetint::core::fluent_types;     // NOLINT
usingnamespacetint::core::number_suffixes;  // NOLINT

TEST_F(GlslWriterTest, EmitType_Array) {}

TEST_F(GlslWriterTest, EmitType_ArrayOfArray) {}

TEST_F(GlslWriterTest, EmitType_ArrayOfArrayOfArray) {}

TEST_F(GlslWriterTest, EmitType_Bool) {}

TEST_F(GlslWriterTest, EmitType_F32) {}

TEST_F(GlslWriterTest, EmitType_F16) {}

TEST_F(GlslWriterTest, EmitType_I32) {}

TEST_F(GlslWriterTest, EmitType_Matrix_F32) {}

TEST_F(GlslWriterTest, EmitType_MatrixSquare_F32) {}

TEST_F(GlslWriterTest, EmitType_Matrix_F16) {}

TEST_F(GlslWriterTest, EmitType_U32) {}

// TODO(dsinclair): Add atomic support
TEST_F(GlslWriterTest, DISABLED_EmitType_Atomic_U32) {}

// TODO(dsinclair): Add atomic support
TEST_F(GlslWriterTest, DISABLED_EmitType_Atomic_I32) {}

TEST_F(GlslWriterTest, EmitType_Vector_F32) {}

TEST_F(GlslWriterTest, EmitType_Vector_F16) {}

TEST_F(GlslWriterTest, EmitType_Vector_I32) {}

TEST_F(GlslWriterTest, EmitType_Vector_U32) {}

TEST_F(GlslWriterTest, EmitType_Vector_bool) {}

TEST_F(GlslWriterTest, EmitType_Void) {}

TEST_F(GlslWriterTest, EmitType_Struct) {}

TEST_F(GlslWriterTest, EmitType_Struct_Dedup) {}

TEST_F(GlslWriterTest, EmitType_Struct_Nested) {}

// TODO(dsinclair): Add sampler support
TEST_F(GlslWriterTest, DISABLED_EmitType_Sampler) {}

// TODO(dsinclair): Add sampler comparison support
TEST_F(GlslWriterTest, DISABLED_EmitType_SamplerComparison) {}

struct GlslDepthTextureData {};
inline std::ostream& operator<<(std::ostream& out, GlslDepthTextureData data) {}
GlslWriterDepthTexturesTest;
// TODO(dsinclair): Add depth texture support
TEST_P(GlslWriterDepthTexturesTest, DISABLED_Emit) {}
INSTANTIATE_TEST_SUITE_P();

// TODO(dsinclair): Add depth multisampled support
TEST_F(GlslWriterTest, DISABLED_EmitType_DepthMultisampledTexture) {}

enum class TextureDataType : uint8_t {};

struct GlslTextureData {};
inline std::ostream& operator<<(std::ostream& out, GlslTextureData data) {}
GlslWriterSampledTexturesTest;
// TODO(dsinclair): Add sampled texture support
TEST_P(GlslWriterSampledTexturesTest, DISABLED_Emit) {}
INSTANTIATE_TEST_SUITE_P();

// TODO(dsinclair): Add multisampled texture support
TEST_F(GlslWriterTest, DISABLED_EmitType_MultisampledTexture) {}

struct GlslStorageTextureData {};
inline std::ostream& operator<<(std::ostream& out, GlslStorageTextureData data) {}
GlslWriterStorageTexturesTest;
// TODO(dsinclair): Add storage texture support
TEST_P(GlslWriterStorageTexturesTest, Emit) {}
INSTANTIATE_TEST_SUITE_P();

}  // namespace
}  // namespace tint::glsl::writer