tint: Add diagnostic and enable to ModuleCloneTest
Bug: tint:1809 Change-Id: I671440bf2b1f988eb39bd476841e92c3a7e58ae7 Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/117600 Reviewed-by: Ben Clayton <bclayton@google.com> Kokoro: Kokoro <noreply+kokoro@google.com>
This commit is contained in:
parent
c744a23d77
commit
613fbcf79a
|
@ -24,7 +24,10 @@ namespace {
|
|||
TEST(ModuleCloneTest, Clone) {
|
||||
// Shader that exercises the bulk of the AST nodes and types.
|
||||
// See also fuzzers/tint_ast_clone_fuzzer.cc for further coverage of cloning.
|
||||
Source::File file("test.wgsl", R"(struct S0 {
|
||||
Source::File file("test.wgsl", R"(enable f16;
|
||||
diagnostic(off, chromium_unreachable_code);
|
||||
|
||||
struct S0 {
|
||||
@size(4)
|
||||
m0 : u32,
|
||||
m1 : array<u32>,
|
||||
|
@ -62,6 +65,7 @@ fn f0(p0 : bool) -> f32 {
|
|||
return 0.0;
|
||||
}
|
||||
|
||||
@diagnostic(warning, chromium_unreachable_code)
|
||||
fn f1(p0 : f32, p1 : i32) -> f32 {
|
||||
var l0 : i32 = 3;
|
||||
var l1 : f32 = 8.0;
|
||||
|
|
Loading…
Reference in New Issue