Loading libs/rs/java/tests/src/com/android/rs/test/primitives.rs +10 −0 Original line number Diff line number Diff line Loading @@ -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; Loading @@ -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); Loading Loading
libs/rs/java/tests/src/com/android/rs/test/primitives.rs +10 −0 Original line number Diff line number Diff line Loading @@ -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; Loading @@ -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); Loading