aboutsummaryrefslogtreecommitdiffstats
path: root/tests/F_anon_struct
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
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')
-rw-r--r--tests/F_anon_struct/anon_struct.rs11
-rw-r--r--tests/F_anon_struct/stderr.txt.expect1
-rw-r--r--tests/F_anon_struct/stdout.txt.expect0
3 files changed, 12 insertions, 0 deletions
diff --git a/tests/F_anon_struct/anon_struct.rs b/tests/F_anon_struct/anon_struct.rs
new file mode 100644
index 0000000..e6c549a
--- /dev/null
+++ b/tests/F_anon_struct/anon_struct.rs
@@ -0,0 +1,11 @@
+#pragma version(1)
+#pragma rs java_package_name(foo)
+
+struct {
+ int i;
+} myStruct;
+
+int root(int num) {
+ return 10;
+}
+
diff --git a/tests/F_anon_struct/stderr.txt.expect b/tests/F_anon_struct/stderr.txt.expect
new file mode 100644
index 0000000..efc6f94
--- /dev/null
+++ b/tests/F_anon_struct/stderr.txt.expect
@@ -0,0 +1 @@
+anon_struct.rs:4:1: error: anonymous structures cannot be exported
diff --git a/tests/F_anon_struct/stdout.txt.expect b/tests/F_anon_struct/stdout.txt.expect
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/tests/F_anon_struct/stdout.txt.expect