Fix unnecessarily broken sections in slang tests.
These tests mostly were including broken kernel functions (in addition
to their other errors). It is best to remove these unnecessary blocks
for clarity in the individual tests. llvm-rs-cc is intended to return
C99-related errors first, and any possible RS-kernel-reflection errors
only once that completes successfully (which is why we never noticed
this before). I also renamed some of the misnamed tests (we don't retain
the P_ or F_ prefix on the source filenames).
Change-Id: I9995e8b05817c895676e0eaa1adde263dc639cc0
diff --git a/tests/F_anon_struct/anon_struct.rs b/tests/F_anon_struct/anon_struct.rs
index e6c549a..46bd8cb 100644
--- a/tests/F_anon_struct/anon_struct.rs
+++ b/tests/F_anon_struct/anon_struct.rs
@@ -4,8 +4,3 @@
struct {
int i;
} myStruct;
-
-int root(int num) {
- return 10;
-}
-
diff --git a/tests/F_anon_struct_typedef/anon_struct_typedef.rs b/tests/F_anon_struct_typedef/anon_struct_typedef.rs
index 242df05..dcd12f4 100644
--- a/tests/F_anon_struct_typedef/anon_struct_typedef.rs
+++ b/tests/F_anon_struct_typedef/anon_struct_typedef.rs
@@ -7,7 +7,3 @@
anon myStruct;
-int root(int num) {
- return 10;
-}
-
diff --git a/tests/F_ctxt_wrong_api/F_ctxt_wrong_api.rs b/tests/F_ctxt_wrong_api/ctxt_wrong_api.rs
similarity index 100%
rename from tests/F_ctxt_wrong_api/F_ctxt_wrong_api.rs
rename to tests/F_ctxt_wrong_api/ctxt_wrong_api.rs
diff --git a/tests/F_ctxt_wrong_api/stderr.txt.expect b/tests/F_ctxt_wrong_api/stderr.txt.expect
index 74d70f7..1ab01a2 100644
--- a/tests/F_ctxt_wrong_api/stderr.txt.expect
+++ b/tests/F_ctxt_wrong_api/stderr.txt.expect
@@ -1 +1 @@
-F_ctxt_wrong_api.rs:5:28: error: unknown type name 'rs_kernel_context'
+ctxt_wrong_api.rs:5:28: error: unknown type name 'rs_kernel_context'
diff --git a/tests/F_ctxt_wrong_place/F_ctxt_wrong_place.rs b/tests/F_ctxt_wrong_place/ctxt_wrong_place.rs
similarity index 100%
rename from tests/F_ctxt_wrong_place/F_ctxt_wrong_place.rs
rename to tests/F_ctxt_wrong_place/ctxt_wrong_place.rs
diff --git a/tests/F_ctxt_wrong_place/stderr.txt.expect b/tests/F_ctxt_wrong_place/stderr.txt.expect
index 70b3f6e..fc2a67d 100644
--- a/tests/F_ctxt_wrong_place/stderr.txt.expect
+++ b/tests/F_ctxt_wrong_place/stderr.txt.expect
@@ -1 +1 @@
-F_ctxt_wrong_place.rs:9:57: error: In compute kernel bad(), special parameter 'context' must be defined before special parameter 'x'.
+ctxt_wrong_place.rs:9:57: error: In compute kernel bad(), special parameter 'context' must be defined before special parameter 'x'.
diff --git a/tests/F_ctxt_wrong_type/F_ctxt_wrong_type.rs b/tests/F_ctxt_wrong_type/ctxt_wrong_type.rs
similarity index 100%
rename from tests/F_ctxt_wrong_type/F_ctxt_wrong_type.rs
rename to tests/F_ctxt_wrong_type/ctxt_wrong_type.rs
diff --git a/tests/F_ctxt_wrong_type/stderr.txt.expect b/tests/F_ctxt_wrong_type/stderr.txt.expect
index d6de8fa..ff2d98c 100644
--- a/tests/F_ctxt_wrong_type/stderr.txt.expect
+++ b/tests/F_ctxt_wrong_type/stderr.txt.expect
@@ -1 +1 @@
-F_ctxt_wrong_type.rs:13:53: error: Special parameter 'context' must be of type 'rs_kernel_context'. It is of type 'const rs_kernel_context *'.
+ctxt_wrong_type.rs:13:53: error: Special parameter 'context' must be of type 'rs_kernel_context'. It is of type 'const rs_kernel_context *'.
diff --git a/tests/F_float3_array/float3_array.rs b/tests/F_float3_array/float3_array.rs
index 77d4f04..b928569 100644
--- a/tests/F_float3_array/float3_array.rs
+++ b/tests/F_float3_array/float3_array.rs
@@ -3,7 +3,3 @@
float3 f[2];
-int root(int num) {
- return 10;
-}
-
diff --git a/tests/F_fs_types/fs_types.fs b/tests/F_fs_types/fs_types.fs
index 12c22ce..0fae063 100644
--- a/tests/F_fs_types/fs_types.fs
+++ b/tests/F_fs_types/fs_types.fs
@@ -30,9 +30,3 @@
m = l;
}
-void foo_ld(long double l) {
- long double m;
- float f = 0.0L;
- m = l;
-}
-
diff --git a/tests/F_fs_types/stderr.txt.expect b/tests/F_fs_types/stderr.txt.expect
index 9422d76..f0d36a3 100644
--- a/tests/F_fs_types/stderr.txt.expect
+++ b/tests/F_fs_types/stderr.txt.expect
@@ -12,7 +12,3 @@
fs_types.fs:28:15: error: Builtin types > 32 bits in size are forbidden in Filterscript: 'm'
fs_types.fs:29:13: error: Builtin types > 32 bits in size are forbidden in Filterscript
fs_types.fs:30:7: error: Builtin types > 32 bits in size are forbidden in Filterscript
-fs_types.fs:33:13: error: Builtin types > 32 bits in size are forbidden in Filterscript: 'l'
-fs_types.fs:34:17: error: Builtin types > 32 bits in size are forbidden in Filterscript: 'm'
-fs_types.fs:35:15: error: Builtin types > 32 bits in size are forbidden in Filterscript
-fs_types.fs:36:7: error: Builtin types > 32 bits in size are forbidden in Filterscript
diff --git a/tests/F_large_array/large_array.rs b/tests/F_large_array/large_array.rs
index a4fda39..db53e2e 100644
--- a/tests/F_large_array/large_array.rs
+++ b/tests/F_large_array/large_array.rs
@@ -4,7 +4,3 @@
char arr_pass[4294967295];
char arr_fail[4294967296];
-int root(int num) {
- return 10;
-}
-
diff --git a/tests/F_multidim_array/multidim_array.rs b/tests/F_multidim_array/multidim_array.rs
index 0dc8426..cf967e0 100644
--- a/tests/F_multidim_array/multidim_array.rs
+++ b/tests/F_multidim_array/multidim_array.rs
@@ -2,8 +2,3 @@
#pragma rs java_package_name(foo)
int arr[2][2];
-
-int root(int num) {
- return 10;
-}
-
diff --git a/tests/F_no_version_pragma/no_version_pragma.rs b/tests/F_no_version_pragma/no_version_pragma.rs
index 5b416d1..9b928ce 100644
--- a/tests/F_no_version_pragma/no_version_pragma.rs
+++ b/tests/F_no_version_pragma/no_version_pragma.rs
@@ -1,7 +1 @@
-
#pragma rs java_package_name(foo)
-
-int root(int num) {
- return 10;
-}
-
diff --git a/tests/F_no_version_pragma/stderr.txt.expect b/tests/F_no_version_pragma/stderr.txt.expect
index d7c30b8..cdfa917 100644
--- a/tests/F_no_version_pragma/stderr.txt.expect
+++ b/tests/F_no_version_pragma/stderr.txt.expect
@@ -1 +1 @@
-no_version_pragma.rs:8:1: error: missing pragma for version in source file
+no_version_pragma.rs:2:1: error: missing pragma for version in source file
diff --git a/tests/F_ptr_in_struct/ptr_in_struct.rs b/tests/F_ptr_in_struct/ptr_in_struct.rs
index db580db..7bc41ca 100644
--- a/tests/F_ptr_in_struct/ptr_in_struct.rs
+++ b/tests/F_ptr_in_struct/ptr_in_struct.rs
@@ -7,7 +7,3 @@
struct s myStruct;
-int root(int num) {
- return 10;
-}
-
diff --git a/tests/F_rs_prefix/rs_prefix.rs b/tests/F_rs_prefix/rs_prefix.rs
index 5fd9ac7..99ae9aa 100644
--- a/tests/F_rs_prefix/rs_prefix.rs
+++ b/tests/F_rs_prefix/rs_prefix.rs
@@ -4,8 +4,3 @@
void rs_foo() {
return;
}
-
-int root(int num) {
- return 10;
-}
-
diff --git a/tests/F_struct_array_copy/struct_array_copy.rs b/tests/F_struct_array_copy/struct_array_copy.rs
index 382d84e..1b55100 100644
--- a/tests/F_struct_array_copy/struct_array_copy.rs
+++ b/tests/F_struct_array_copy/struct_array_copy.rs
@@ -35,7 +35,3 @@
mS = localStruct;
}
-int root(int num) {
- return 10;
-}
-
diff --git a/tests/F_struct_bitfield/struct_bitfield.rs b/tests/F_struct_bitfield/struct_bitfield.rs
index 339d4bc..95e3418 100644
--- a/tests/F_struct_bitfield/struct_bitfield.rs
+++ b/tests/F_struct_bitfield/struct_bitfield.rs
@@ -5,7 +5,3 @@
int x:1;
} myStruct;
-int root(int num) {
- return 10;
-}
-
diff --git a/tests/F_struct_float3_array/struct_float3_array.rs b/tests/F_struct_float3_array/struct_float3_array.rs
index 0758d65..58d6d64 100644
--- a/tests/F_struct_float3_array/struct_float3_array.rs
+++ b/tests/F_struct_float3_array/struct_float3_array.rs
@@ -5,7 +5,3 @@
float3 f[2];
} myStruct;
-int root(int num) {
- return 10;
-}
-
diff --git a/tests/F_struct_ptr/struct_ptr.rs b/tests/F_struct_ptr/struct_ptr.rs
index f2466d0..15eee65 100644
--- a/tests/F_struct_ptr/struct_ptr.rs
+++ b/tests/F_struct_ptr/struct_ptr.rs
@@ -3,7 +3,3 @@
struct s *myStruct;
-int root(int num) {
- return 10;
-}
-
diff --git a/tests/F_too_many_inputs/stderr.txt.expect b/tests/F_too_many_inputs/stderr.txt.expect
index a5578f6..aec9fdc 100644
--- a/tests/F_too_many_inputs/stderr.txt.expect
+++ b/tests/F_too_many_inputs/stderr.txt.expect
@@ -1 +1 @@
-F_too_many_inputs.rs:9:95: error: Invalid parameter 'in8' for compute kernel bad(). Kernels targeting SDK levels 23+ may not use more than 8 input parameters.
+too_many_inputs.rs:9:95: error: Invalid parameter 'in8' for compute kernel bad(). Kernels targeting SDK levels 23+ may not use more than 8 input parameters.
diff --git a/tests/F_too_many_inputs/F_too_many_inputs.rs b/tests/F_too_many_inputs/too_many_inputs.rs
similarity index 100%
rename from tests/F_too_many_inputs/F_too_many_inputs.rs
rename to tests/F_too_many_inputs/too_many_inputs.rs
diff --git a/tests/F_vector_cast/vector_cast.rs b/tests/F_vector_cast/vector_cast.rs
index bd49391..fa49d97 100644
--- a/tests/F_vector_cast/vector_cast.rs
+++ b/tests/F_vector_cast/vector_cast.rs
@@ -21,7 +21,7 @@
u = (uchar4) c;
}
-uchar4 bar(uchar4 u) {
+static uchar4 bar(uchar4 u) {
return u;
}
diff --git a/tests/F_z_wrong_api/stderr.txt.expect b/tests/F_z_wrong_api/stderr.txt.expect
index 0a64501..64a5785 100644
--- a/tests/F_z_wrong_api/stderr.txt.expect
+++ b/tests/F_z_wrong_api/stderr.txt.expect
@@ -1 +1 @@
-F_z_wrong_api.rs:5:60: error: Compute kernel bad() targeting SDK levels 11-22 may not use special parameter 'z'.
+z_wrong_api.rs:5:60: error: Compute kernel bad() targeting SDK levels 11-22 may not use special parameter 'z'.
diff --git a/tests/F_z_wrong_api/F_z_wrong_api.rs b/tests/F_z_wrong_api/z_wrong_api.rs
similarity index 100%
rename from tests/F_z_wrong_api/F_z_wrong_api.rs
rename to tests/F_z_wrong_api/z_wrong_api.rs