validation: structures cannot be empty

Fixed many tests that had empty structures.

Change-Id: Id91312afa39a6293426f99d0dd12578dba46aa61
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/56621
Auto-Submit: James Price <jrprice@google.com>
Commit-Queue: Ben Clayton <bclayton@google.com>
Kokoro: Kokoro <noreply+kokoro@google.com>
Reviewed-by: Ben Clayton <bclayton@google.com>
This commit is contained in:
James Price
2021-07-01 08:13:41 +00:00
committed by Tint LUCI CQ
parent d4c64af117
commit 37cabbb468
42 changed files with 86 additions and 36 deletions

View File

@@ -28,6 +28,7 @@ TEST_F(BindingRemapperTest, NoRemappings) {
auto* src = R"(
[[block]]
struct S {
a : f32;
};
[[group(2), binding(1)]] var<storage, read> a : S;
@@ -53,6 +54,7 @@ TEST_F(BindingRemapperTest, RemapBindingPoints) {
auto* src = R"(
[[block]]
struct S {
a : f32;
};
[[group(2), binding(1)]] var<storage, read> a : S;
@@ -67,6 +69,7 @@ fn f() {
auto* expect = R"(
[[block]]
struct S {
a : f32;
};
[[group(1), binding(2)]] var<storage, read> a : S;
@@ -95,6 +98,7 @@ TEST_F(BindingRemapperTest, RemapAccessControls) {
auto* src = R"(
[[block]]
struct S {
a : f32;
};
[[group(2), binding(1)]] var<storage, read> a : S;
@@ -111,6 +115,7 @@ fn f() {
auto* expect = R"(
[[block]]
struct S {
a : f32;
};
[[group(2), binding(1)]] var<storage, write> a : S;
@@ -143,6 +148,7 @@ TEST_F(BindingRemapperTest, DISABLED_RemapAccessControlsWithAliases) {
auto* src = R"(
[[block]]
struct S {
a : f32;
};
type, read ReadOnlyS = S;
@@ -165,6 +171,7 @@ fn f() {
auto* expect = R"(
[[block]]
struct S {
a : f32;
};
type, read ReadOnlyS = S;
@@ -201,6 +208,7 @@ TEST_F(BindingRemapperTest, RemapAll) {
auto* src = R"(
[[block]]
struct S {
a : f32;
};
[[group(2), binding(1)]] var<storage, read> a : S;
@@ -215,6 +223,7 @@ fn f() {
auto* expect = R"(
[[block]]
struct S {
a : f32;
};
[[group(4), binding(5)]] var<storage, write> a : S;
@@ -363,6 +372,7 @@ TEST_F(BindingRemapperTest, NoData) {
auto* src = R"(
[[block]]
struct S {
a : f32;
};
[[group(2), binding(1)]] var<storage, read> a : S;

View File

@@ -191,6 +191,7 @@ TEST_F(MslTest, HandleModuleScopeVariables_OtherVariables) {
auto* src = R"(
[[block]]
struct S {
a : f32;
};
[[group(0), binding(0)]]
@@ -204,6 +205,7 @@ fn main() {
auto* expect = R"(
[[block]]
struct S {
a : f32;
};
[[group(0), binding(0)]] var<uniform> u : S;