diff options
author | Stephen Hines <srhines@google.com> | 2010-12-06 14:57:04 -0800 |
---|---|---|
committer | Stephen Hines <srhines@google.com> | 2010-12-06 15:18:45 -0800 |
commit | cd440ee9b3bdb7985a20b2cd4b0f8229de34f0a9 (patch) | |
tree | 1f3cc3bbf5695fd1dd0071afe4c12a4cbda74fe2 /tests/F_union | |
parent | 8dd522d2a6b96c79117bdc5d6b58d336846e4346 (diff) | |
download | android_frameworks_compile_slang-cd440ee9b3bdb7985a20b2cd4b0f8229de34f0a9.tar.gz android_frameworks_compile_slang-cd440ee9b3bdb7985a20b2cd4b0f8229de34f0a9.tar.bz2 android_frameworks_compile_slang-cd440ee9b3bdb7985a20b2cd4b0f8229de34f0a9.zip |
Forbid unions from being exported by llvm-rs-cc.
This also adds a directed F_union test.
Bug: 2954471
Change-Id: I094e2a64df1deabb014ce09a42e5f1ef91b563d0
Diffstat (limited to 'tests/F_union')
-rw-r--r-- | tests/F_union/stderr.txt.expect | 1 | ||||
-rw-r--r-- | tests/F_union/stdout.txt.expect | 0 | ||||
-rw-r--r-- | tests/F_union/union.rs | 12 |
3 files changed, 13 insertions, 0 deletions
diff --git a/tests/F_union/stderr.txt.expect b/tests/F_union/stderr.txt.expect new file mode 100644 index 0000000..720d895 --- /dev/null +++ b/tests/F_union/stderr.txt.expect @@ -0,0 +1 @@ +union.rs:4:7: error: unions cannot be exported: 'u' diff --git a/tests/F_union/stdout.txt.expect b/tests/F_union/stdout.txt.expect new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/tests/F_union/stdout.txt.expect diff --git a/tests/F_union/union.rs b/tests/F_union/union.rs new file mode 100644 index 0000000..85969b2 --- /dev/null +++ b/tests/F_union/union.rs @@ -0,0 +1,12 @@ +#pragma version(1) +#pragma rs java_package_name(foo) + +union u { + int i; + float f; +} myUnion; + +int root(int num) { + return 10; +} + |