Skip to content

Commit

Permalink
Resolved failed tests on ARM64 by making two tests arch-dependent (is…
Browse files Browse the repository at this point in the history
…sue #347).
  • Loading branch information
Wei Dai committed Jun 8, 2021
1 parent d64edde commit d086062
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions native/tests/seal/util/common.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,9 @@ namespace sealtest
unsigned char pos_uc_max = 0xFF;
unsigned long long pos_ull = 1;
unsigned long long pos_ull_max = 0xFFFFFFFFFFFFFFFF;
#if defined(__aarch64__) || defined(_M_ARM64)
unsigned long long pos_ull_neg_c = 0xFF;
#endif
long long neg_ull = -1;

ASSERT_TRUE(unsigned_eq(pos_i, pos_i));
Expand All @@ -50,7 +53,11 @@ namespace sealtest
ASSERT_TRUE(unsigned_geq(pos_uc, pos_c));
ASSERT_TRUE(unsigned_leq(pos_uc, pos_c));
ASSERT_TRUE(unsigned_lt(pos_uc_max, neg_c));
#if defined(__aarch64__) || defined(_M_ARM64)
ASSERT_TRUE(unsigned_eq(neg_c, pos_ull_neg_c));
#else
ASSERT_TRUE(unsigned_eq(neg_c, pos_ull_max));
#endif
ASSERT_TRUE(unsigned_eq(neg_ull, pos_ull_max));
ASSERT_FALSE(unsigned_lt(neg_ull, pos_ull_max));
ASSERT_TRUE(unsigned_lt(pos_ull, pos_ull_max));
Expand Down Expand Up @@ -106,7 +113,11 @@ namespace sealtest
ASSERT_TRUE(fits_in<unsigned>(pos_s));
ASSERT_TRUE(fits_in<char>(pos_uc));
ASSERT_FALSE(fits_in<unsigned>(neg_i));
#if defined(__aarch64__) || defined(_M_ARM64)
ASSERT_TRUE(fits_in<char>(pos_uc_max));
#else
ASSERT_FALSE(fits_in<char>(pos_uc_max));
#endif
ASSERT_TRUE(fits_in<float>(d));
ASSERT_TRUE(fits_in<double>(f));
ASSERT_TRUE(fits_in<int>(d));
Expand Down

0 comments on commit d086062

Please sign in to comment.