diff options
author | Stephen Hines <srhines@google.com> | 2012-01-31 19:32:04 -0800 |
---|---|---|
committer | Stephen Hines <srhines@google.com> | 2012-01-31 19:42:37 -0800 |
commit | 5d67178077b50d0a02832e91053ee71ec33a25c2 (patch) | |
tree | f34b6c82678f6da4d255ed0fc1b5e39f7f049856 /tests | |
parent | a4c54ee5ceb193d514618d341ec6967bff02cb2b (diff) | |
download | slang-5d67178077b50d0a02832e91053ee71ec33a25c2.tar.gz |
Reflect constant primitive types back to Java.
We reflect it in the containing class as follows:
public final static TYPE const_NAME = INIT;
Change-Id: I478a6ba75715cfe3ddf1196794153721b793b287
Diffstat (limited to 'tests')
-rw-r--r-- | tests/P_constant/constant.rs | 20 | ||||
-rw-r--r-- | tests/P_constant/stderr.txt.expect | 0 | ||||
-rw-r--r-- | tests/P_constant/stdout.txt.expect | 1 |
3 files changed, 21 insertions, 0 deletions
diff --git a/tests/P_constant/constant.rs b/tests/P_constant/constant.rs new file mode 100644 index 0000000..6f98ff1 --- /dev/null +++ b/tests/P_constant/constant.rs @@ -0,0 +1,20 @@ +#pragma version(1) +#pragma rs java_package_name(foo) + +const float floatTest = 1.99f; +const double doubleTest = 2.05; +const char charTest = -8; +const short shortTest = -16; +const int intTest = -32; +const long longTest = 17179869184l; // 1 << 34 +const long long longlongTest = 68719476736l; // 1 << 36 + +const uchar ucharTest = 8; +const ushort ushortTest = 16; +const uint uintTest = 32; +const ulong ulongTest = 4611686018427387904L; +const int64_t int64_tTest = -17179869184l; // - 1 << 34 +const uint64_t uint64_tTest = 117179869184l; + +const bool boolTest = true; + diff --git a/tests/P_constant/stderr.txt.expect b/tests/P_constant/stderr.txt.expect new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/tests/P_constant/stderr.txt.expect diff --git a/tests/P_constant/stdout.txt.expect b/tests/P_constant/stdout.txt.expect new file mode 100644 index 0000000..3c27edd --- /dev/null +++ b/tests/P_constant/stdout.txt.expect @@ -0,0 +1 @@ +Generating ScriptC_constant.java ... |