chromium/third_party/dawn/src/tint/lang/wgsl/resolver/resolver_behavior_test.cc

// Copyright 2021 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/wgsl/resolver/resolver.h"

#include "gtest/gtest.h"
#include "src/tint/lang/wgsl/resolver/resolver_helper_test.h"
#include "src/tint/lang/wgsl/sem/for_loop_statement.h"
#include "src/tint/lang/wgsl/sem/if_statement.h"
#include "src/tint/lang/wgsl/sem/switch_statement.h"
#include "src/tint/lang/wgsl/sem/value_expression.h"
#include "src/tint/lang/wgsl/sem/while_statement.h"

namespace tint::resolver {
namespace {

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

class ResolverBehaviorTest : public ResolverTest {};

TEST_F(ResolverBehaviorTest, ExprBinaryOp_LHS) {}

TEST_F(ResolverBehaviorTest, ExprBinaryOp_RHS) {}

TEST_F(ResolverBehaviorTest, ExprBitcastOp) {}

TEST_F(ResolverBehaviorTest, ExprIndex_Arr) {}

TEST_F(ResolverBehaviorTest, ExprIndex_Idx) {}

TEST_F(ResolverBehaviorTest, ExprUnaryOp) {}

TEST_F(ResolverBehaviorTest, StmtAssign) {}

TEST_F(ResolverBehaviorTest, StmtAssign_LHSDiscardOrNext) {}

TEST_F(ResolverBehaviorTest, StmtAssign_RHSDiscardOrNext) {}

TEST_F(ResolverBehaviorTest, StmtBlockEmpty) {}

TEST_F(ResolverBehaviorTest, StmtBlockSingleStmt) {}

TEST_F(ResolverBehaviorTest, StmtCallReturn) {}

TEST_F(ResolverBehaviorTest, StmtCallFuncDiscard) {}

TEST_F(ResolverBehaviorTest, StmtCallFuncMayDiscard) {}

TEST_F(ResolverBehaviorTest, StmtBreak) {}

TEST_F(ResolverBehaviorTest, StmtContinue) {}

TEST_F(ResolverBehaviorTest, StmtDiscard) {}

TEST_F(ResolverBehaviorTest, StmtForLoopEmpty_NoExit) {}

TEST_F(ResolverBehaviorTest, StmtForLoopBreak) {}

TEST_F(ResolverBehaviorTest, StmtForLoopContinue_NoExit) {}

TEST_F(ResolverBehaviorTest, StmtForLoopDiscard) {}

TEST_F(ResolverBehaviorTest, StmtForLoopReturn) {}

TEST_F(ResolverBehaviorTest, StmtForLoopBreak_InitCallFuncMayDiscard) {}

TEST_F(ResolverBehaviorTest, StmtForLoopEmpty_InitCallFuncMayDiscard) {}

TEST_F(ResolverBehaviorTest, StmtForLoopEmpty_CondTrue) {}

TEST_F(ResolverBehaviorTest, StmtForLoopEmpty_CondCallFuncMayDiscard) {}

TEST_F(ResolverBehaviorTest, StmtWhileBreak) {}

TEST_F(ResolverBehaviorTest, StmtWhileDiscard) {}

TEST_F(ResolverBehaviorTest, StmtWhileReturn) {}

TEST_F(ResolverBehaviorTest, StmtWhileEmpty_CondTrue) {}

TEST_F(ResolverBehaviorTest, StmtWhileEmpty_CondCallFuncMayDiscard) {}

TEST_F(ResolverBehaviorTest, StmtIfTrue_ThenEmptyBlock) {}

TEST_F(ResolverBehaviorTest, StmtIfTrue_ThenDiscard) {}

TEST_F(ResolverBehaviorTest, StmtIfTrue_ThenEmptyBlock_ElseDiscard) {}

TEST_F(ResolverBehaviorTest, StmtIfTrue_ThenDiscard_ElseDiscard) {}

TEST_F(ResolverBehaviorTest, StmtIfCallFuncMayDiscard_ThenEmptyBlock) {}

TEST_F(ResolverBehaviorTest, StmtIfTrue_ThenEmptyBlock_ElseCallFuncMayDiscard) {}

TEST_F(ResolverBehaviorTest, StmtLetDecl) {}

TEST_F(ResolverBehaviorTest, StmtLetDecl_RHSDiscardOrNext) {}

TEST_F(ResolverBehaviorTest, StmtLoopEmpty_NoExit) {}

TEST_F(ResolverBehaviorTest, StmtLoopBreak) {}

TEST_F(ResolverBehaviorTest, StmtLoopContinue_NoExit) {}

TEST_F(ResolverBehaviorTest, StmtLoopDiscard) {}

TEST_F(ResolverBehaviorTest, StmtLoopReturn) {}

TEST_F(ResolverBehaviorTest, StmtLoopEmpty_ContEmpty_NoExit) {}

TEST_F(ResolverBehaviorTest, StmtLoopEmpty_BreakIf) {}

TEST_F(ResolverBehaviorTest, StmtReturn) {}

TEST_F(ResolverBehaviorTest, StmtReturn_DiscardOrNext) {}

TEST_F(ResolverBehaviorTest, StmtSwitch_CondTrue_DefaultEmpty) {}

TEST_F(ResolverBehaviorTest, StmtSwitch_CondLiteral_DefaultEmpty) {}

TEST_F(ResolverBehaviorTest, StmtSwitch_CondLiteral_DefaultDiscard) {}

TEST_F(ResolverBehaviorTest, StmtSwitch_CondLiteral_DefaultReturn) {}

TEST_F(ResolverBehaviorTest, StmtSwitch_CondLiteral_Case0Empty_DefaultEmpty) {}

TEST_F(ResolverBehaviorTest, StmtSwitch_CondLiteral_Case0Empty_DefaultDiscard) {}

TEST_F(ResolverBehaviorTest, StmtSwitch_CondLiteral_Case0Empty_DefaultReturn) {}

TEST_F(ResolverBehaviorTest, StmtSwitch_CondLiteral_Case0Discard_DefaultEmpty) {}

TEST_F(ResolverBehaviorTest, StmtSwitch_CondLiteral_Case0Discard_DefaultDiscard) {}

TEST_F(ResolverBehaviorTest, StmtSwitch_CondLiteral_Case0Discard_DefaultReturn) {}

TEST_F(ResolverBehaviorTest, StmtSwitch_CondLiteral_Case0Discard_Case1Return_DefaultEmpty) {}

TEST_F(ResolverBehaviorTest, StmtSwitch_CondCallFuncMayDiscard_DefaultEmpty) {}

TEST_F(ResolverBehaviorTest, StmtVarDecl) {}

TEST_F(ResolverBehaviorTest, StmtVarDecl_RHSDiscardOrNext) {}

}  // namespace
}  // namespace tint::resolver