mirror of
https://github.com/encounter/dawn-cmake.git
synced 2025-08-18 09:51:34 +00:00
This CL updates a few names in the statement element to match the spec. The `body_stmt` is now `compound_statement`. Bug: tint:1633 Change-Id: I23a622fc8587641d3b6c5ff2641f29a3471fa4e1 Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/98280 Commit-Queue: Dan Sinclair <dsinclair@chromium.org> Kokoro: Kokoro <noreply+kokoro@google.com> Reviewed-by: Antonio Maiorano <amaiorano@google.com>
32 lines
1.0 KiB
C++
32 lines
1.0 KiB
C++
// Copyright 2020 The Tint Authors.
|
|
//
|
|
// Licensed under the Apache License, Version 2.0 (the "License");
|
|
// you may not use this file except in compliance with the License.
|
|
// You may obtain a copy of the License at
|
|
//
|
|
// http://www.apache.org/licenses/LICENSE-2.0
|
|
//
|
|
// Unless required by applicable law or agreed to in writing, software
|
|
// distributed under the License is distributed on an "AS IS" BASIS,
|
|
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
// See the License for the specific language governing permissions and
|
|
// limitations under the License.
|
|
|
|
#include "src/tint/ast/break_statement.h"
|
|
#include "src/tint/reader/wgsl/parser_impl_test_helper.h"
|
|
|
|
namespace tint::reader::wgsl {
|
|
namespace {
|
|
|
|
TEST_F(ParserImplTest, BreakStmt) {
|
|
auto p = parser("break");
|
|
auto e = p->break_statement();
|
|
EXPECT_FALSE(e.errored);
|
|
EXPECT_FALSE(p->has_error()) << p->error();
|
|
ASSERT_NE(e.value, nullptr);
|
|
ASSERT_TRUE(e->Is<ast::BreakStatement>());
|
|
}
|
|
|
|
} // namespace
|
|
} // namespace tint::reader::wgsl
|