Update test/tint/array to store results
This CL updates the `test/tint/array` tests to make sure the results
are stored back into a storage variable. Also make sure each test has
an entry point.
Change-Id: I8a87129c22ed56bdbcecf69464aa03e9ce387659
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/164580
Kokoro: Kokoro <noreply+kokoro@google.com>
Reviewed-by: Ben Clayton <bclayton@google.com>
Commit-Queue: dan sinclair <dsinclair@chromium.org>
diff --git a/test/tint/array/assign_to_subexpr.wgsl.expected.msl b/test/tint/array/assign_to_subexpr.wgsl.expected.msl
index 8851fcd..4f791ac 100644
--- a/test/tint/array/assign_to_subexpr.wgsl.expected.msl
+++ b/test/tint/array/assign_to_subexpr.wgsl.expected.msl
@@ -18,7 +18,7 @@
tint_array<int, 4> arr;
};
-void foo() {
+int foo() {
tint_array<int, 4> const src = tint_array<int, 4>{};
tint_array<int, 4> dst = {};
S dst_struct = {};
@@ -28,5 +28,11 @@
dst = src;
dst_struct.arr = src;
dst_array[0] = src;
+ return as_type<int>((as_type<uint>(as_type<int>((as_type<uint>(dst[0]) + as_type<uint>(dst_struct.arr[0])))) + as_type<uint>(dst_array[0][0])));
+}
+
+kernel void tint_symbol(device int* tint_symbol_1 [[buffer(0)]]) {
+ *(tint_symbol_1) = foo();
+ return;
}