chromium/third_party/dawn/src/tint/lang/wgsl/reader/program_to_ir/program_to_ir_test.cc

// Copyright 2023 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 "src/tint/lang/core/builtin_fn.h"
#include "src/tint/lang/core/constant/scalar.h"
#include "src/tint/lang/core/fluent_types.h"
#include "src/tint/lang/core/ir/disassembler.h"
#include "src/tint/lang/core/ir/if.h"
#include "src/tint/lang/core/ir/loop.h"
#include "src/tint/lang/core/ir/multi_in_block.h"
#include "src/tint/lang/core/ir/switch.h"
#include "src/tint/lang/wgsl/reader/program_to_ir/ir_program_test.h"

usingnamespacetint::core::fluent_types;  // NOLINT

namespace tint::wgsl::reader {
namespace {

/// Looks for the instruction with the given type T.
/// If no instruction is found, then nullptr is returned.
/// If multiple instructions are found with the type T, then an error is raised and the first is
/// returned.
template <typename T>
T* FindSingleInstruction(core::ir::Module& mod) {}

usingnamespacetint::core::number_suffixes;  // NOLINT

IR_FromProgramTest;

TEST_F(IR_FromProgramTest, Func) {}

TEST_F(IR_FromProgramTest, Func_WithParam) {}

TEST_F(IR_FromProgramTest, Func_WithMultipleParam) {}

TEST_F(IR_FromProgramTest, EntryPoint) {}

TEST_F(IR_FromProgramTest, IfStatement) {}

TEST_F(IR_FromProgramTest, IfStatement_TrueReturns) {}

TEST_F(IR_FromProgramTest, IfStatement_FalseReturns) {}

TEST_F(IR_FromProgramTest, IfStatement_BothReturn) {}

TEST_F(IR_FromProgramTest, IfStatement_JumpChainToMerge) {}

TEST_F(IR_FromProgramTest, Loop_WithBreak) {}

TEST_F(IR_FromProgramTest, Loop_WithContinue) {}

TEST_F(IR_FromProgramTest, Loop_WithContinuing_BreakIf) {}

TEST_F(IR_FromProgramTest, Loop_Continuing_Body_Scope) {}

TEST_F(IR_FromProgramTest, Loop_WithReturn) {}

TEST_F(IR_FromProgramTest, Loop_WithOnlyReturn) {}

TEST_F(IR_FromProgramTest, Loop_WithOnlyReturn_ContinuingBreakIf) {}

TEST_F(IR_FromProgramTest, Loop_WithIf_BothBranchesBreak) {}

TEST_F(IR_FromProgramTest, Loop_Nested) {}

TEST_F(IR_FromProgramTest, While) {}

TEST_F(IR_FromProgramTest, While_Return) {}

TEST_F(IR_FromProgramTest, For) {}

TEST_F(IR_FromProgramTest, For_Init_NoCondOrContinuing) {}

TEST_F(IR_FromProgramTest, For_NoInitCondOrContinuing) {}

TEST_F(IR_FromProgramTest, Switch) {}

TEST_F(IR_FromProgramTest, Switch_MultiSelector) {}

TEST_F(IR_FromProgramTest, Switch_OnlyDefault) {}

TEST_F(IR_FromProgramTest, Switch_WithBreak) {}

TEST_F(IR_FromProgramTest, Switch_AllReturn) {}

TEST_F(IR_FromProgramTest, Emit_Phony) {}

TEST_F(IR_FromProgramTest, Func_WithParam_WithAttribute_Invariant) {}

TEST_F(IR_FromProgramTest, Func_WithParam_WithAttribute_Location) {}

TEST_F(IR_FromProgramTest, Func_WithParam_WithAttribute_Color) {}

TEST_F(IR_FromProgramTest, Func_WithParam_WithAttribute_Location_WithInterpolation_LinearCentroid) {}

TEST_F(IR_FromProgramTest, Func_WithParam_WithAttribute_Location_WithInterpolation_Flat) {}

TEST_F(IR_FromProgramTest, Requires) {}

////////////////////////////////////////////////////////////////////////////////
// Bugs
////////////////////////////////////////////////////////////////////////////////
TEST_F(IR_FromProgramTest, BugChromium324466107) {}

}  // namespace
}  // namespace tint::wgsl::reader