summaryrefslogtreecommitdiffstats
path: root/libs
diff options
context:
space:
mode:
authorStephen Hines <srhines@google.com>2010-10-07 11:42:13 -0700
committerAndroid (Google) Code Review <android-gerrit@google.com>2010-10-07 11:42:13 -0700
commitb8f69ab7c6628943dd04e32f9825f600453d7170 (patch)
tree9bd5218840b20d8bae0cfe65d457b340ff551931 /libs
parentd5df1e5cfcc9e446626692cec72f53e3024fa455 (diff)
parent1d73e57a044a83d8a4c32ab1e6c9ccfcc3f708d6 (diff)
downloadframeworks_base-b8f69ab7c6628943dd04e32f9825f600453d7170.zip
frameworks_base-b8f69ab7c6628943dd04e32f9825f600453d7170.tar.gz
frameworks_base-b8f69ab7c6628943dd04e32f9825f600453d7170.tar.bz2
Merge "Add RS testing for long and long long."
Diffstat (limited to 'libs')
-rw-r--r--libs/rs/java/tests/src/com/android/rs/test/primitives.rs10
1 files changed, 10 insertions, 0 deletions
diff --git a/libs/rs/java/tests/src/com/android/rs/test/primitives.rs b/libs/rs/java/tests/src/com/android/rs/test/primitives.rs
index 5312bcc..012af9c 100644
--- a/libs/rs/java/tests/src/com/android/rs/test/primitives.rs
+++ b/libs/rs/java/tests/src/com/android/rs/test/primitives.rs
@@ -2,15 +2,21 @@
#pragma rs export_func(primitives_test)
+#pragma rs export_var(floatTest, doubleTest, charTest, shortTest, intTest, longTest, longlongTest)
+
// Testing primitive types
static float floatTest = 1.99f;
static double doubleTest = 2.05;
static char charTest = -8;
static short shortTest = -16;
static int intTest = -32;
+static long longTest = 17179869184l; // 1 << 34
+static long long longlongTest = 68719476736l; // 1 << 36
+
static uchar ucharTest = 8;
static ushort ushortTest = 16;
static uint uintTest = 32;
+static int64_t int64_tTest = -17179869184l; // - 1 << 34
static bool test_primitive_types(uint32_t index) {
bool failed = false;
@@ -21,9 +27,13 @@ static bool test_primitive_types(uint32_t index) {
_RS_ASSERT(charTest == -8);
_RS_ASSERT(shortTest == -16);
_RS_ASSERT(intTest == -32);
+ _RS_ASSERT(longTest == 17179869184l);
+ _RS_ASSERT(longlongTest == 68719476736l);
+
_RS_ASSERT(ucharTest == 8);
_RS_ASSERT(ushortTest == 16);
_RS_ASSERT(uintTest == 32);
+ _RS_ASSERT(int64_tTest == -17179869184l);
float time = end(index);