aboutsummaryrefslogtreecommitdiffstats
path: root/tests/F_anon_struct_typedef
diff options
context:
space:
mode:
authorStephen Hines <srhines@google.com>2010-12-02 18:48:20 -0800
committerStephen Hines <srhines@google.com>2010-12-06 10:47:11 -0800
commite5e64432476a44b59c61ded233b1149109c7a7c3 (patch)
tree60325a1fa4a6ea8a91422df589272ae634784137 /tests/F_anon_struct_typedef
parent43bbcdbcca039eb913b4504c19a463d91b2bd404 (diff)
downloadandroid_frameworks_compile_slang-e5e64432476a44b59c61ded233b1149109c7a7c3.tar.gz
android_frameworks_compile_slang-e5e64432476a44b59c61ded233b1149109c7a7c3.tar.bz2
android_frameworks_compile_slang-e5e64432476a44b59c61ded233b1149109c7a7c3.zip
Improved error messages for structs.
This change also adds two new tests for anonymous structures (both with and without an associated typedef). I have also updated test.py to support a more verbose output for dumping the actual test commands that are executed. Change-Id: Ic1edc8d4e98c2017611430eb581c335146ccc927
Diffstat (limited to 'tests/F_anon_struct_typedef')
-rw-r--r--tests/F_anon_struct_typedef/anon_struct_typedef.rs13
-rw-r--r--tests/F_anon_struct_typedef/stderr.txt.expect1
-rw-r--r--tests/F_anon_struct_typedef/stdout.txt.expect0
3 files changed, 14 insertions, 0 deletions
diff --git a/tests/F_anon_struct_typedef/anon_struct_typedef.rs b/tests/F_anon_struct_typedef/anon_struct_typedef.rs
new file mode 100644
index 0000000..242df05
--- /dev/null
+++ b/tests/F_anon_struct_typedef/anon_struct_typedef.rs
@@ -0,0 +1,13 @@
+#pragma version(1)
+#pragma rs java_package_name(foo)
+
+typedef struct {
+ int i;
+} anon;
+
+anon myStruct;
+
+int root(int num) {
+ return 10;
+}
+
diff --git a/tests/F_anon_struct_typedef/stderr.txt.expect b/tests/F_anon_struct_typedef/stderr.txt.expect
new file mode 100644
index 0000000..88df47d
--- /dev/null
+++ b/tests/F_anon_struct_typedef/stderr.txt.expect
@@ -0,0 +1 @@
+anon_struct_typedef.rs:4:9: error: anonymous structures cannot be exported
diff --git a/tests/F_anon_struct_typedef/stdout.txt.expect b/tests/F_anon_struct_typedef/stdout.txt.expect
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/tests/F_anon_struct_typedef/stdout.txt.expect