Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 1d73e57a authored by Stephen Hines's avatar Stephen Hines
Browse files

Add RS testing for long and long long.

Change-Id: I42716b1a273c79103474b2e96441e7e3eac020b9
parent 94e46130
Loading
Loading
Loading
Loading
+10 −0
Original line number Diff line number Diff line
@@ -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);