summaryrefslogtreecommitdiff
path: root/runtime
diff options
context:
space:
mode:
Diffstat (limited to 'runtime')
-rw-r--r--runtime/leb128_test.cc2
-rw-r--r--runtime/reflection_test.cc3
2 files changed, 3 insertions, 2 deletions
diff --git a/runtime/leb128_test.cc b/runtime/leb128_test.cc
index 09f7ecc5d6..122f55ebee 100644
--- a/runtime/leb128_test.cc
+++ b/runtime/leb128_test.cc
@@ -88,7 +88,7 @@ static DecodeSignedLeb128TestCase sleb128_tests[] = {
{-0x08000000, {0x80, 0x80, 0x80, 0x40, 0}},
{-0x08000001, {0xFF, 0xFF, 0xFF, 0xBF, 0x7F}},
{-0x20000000, {0x80, 0x80, 0x80, 0x80, 0x7E}},
- {(-1) << 31, {0x80, 0x80, 0x80, 0x80, 0x78}},
+ {static_cast<int32_t>(0x80000000), {0x80, 0x80, 0x80, 0x80, 0x78}},
};
TEST(Leb128Test, UnsignedSinglesVector) {
diff --git a/runtime/reflection_test.cc b/runtime/reflection_test.cc
index bd89be5d17..c7c270946b 100644
--- a/runtime/reflection_test.cc
+++ b/runtime/reflection_test.cc
@@ -157,7 +157,8 @@ class ReflectionTest : public CommonCompilerTest {
result = InvokeWithJValues(soa, receiver_ref.get(), soa.EncodeMethod(method), args);
EXPECT_EQ(SCHAR_MAX, result.GetB());
- args[0].b = (SCHAR_MIN << 24) >> 24;
+ static_assert(SCHAR_MIN == -128, "SCHAR_MIN unexpected");
+ args[0].b = SCHAR_MIN;
result = InvokeWithJValues(soa, receiver_ref.get(), soa.EncodeMethod(method), args);
EXPECT_EQ(SCHAR_MIN, result.GetB());
}