Skip to content

Commit

Permalink
modify order of operations via parens to satisfy compiler
Browse files Browse the repository at this point in the history
Charles Remes authored and Charles Remes committed Mar 26, 2016
1 parent ae70c8f commit dbac57b
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions machine/test/test_bignum.hpp
Original file line number Diff line number Diff line change
@@ -648,7 +648,7 @@ class TestBignum : public CxxTest::TestSuite, public VMTest {
fix = neg_one->left_shift(state, width_minus1);

TS_ASSERT(kind_of<Fixnum>(fix));
TS_ASSERT_EQUALS((native_int)(0UL - 1L) << (FIXNUM_WIDTH-1), fix->to_native());
TS_ASSERT_EQUALS((native_int)((0UL - 1L) << (FIXNUM_WIDTH-1)), fix->to_native());

Integer* max_plus1 = one->left_shift(state, width);

@@ -676,7 +676,7 @@ class TestBignum : public CxxTest::TestSuite, public VMTest {
fix = neg_one->right_shift(state, neg_width_minus1);

TS_ASSERT(kind_of<Fixnum>(fix));
TS_ASSERT_EQUALS((native_int)(0UL - 1L) << (FIXNUM_WIDTH-1), fix->to_native());
TS_ASSERT_EQUALS((native_int)((0UL - 1L) << (FIXNUM_WIDTH-1)), fix->to_native());

Integer* max_plus1 = one->right_shift(state, neg_width);

@@ -704,7 +704,7 @@ class TestBignum : public CxxTest::TestSuite, public VMTest {
fix = as<Integer>(neg_two->pow(state, width_minus1));

TS_ASSERT(kind_of<Fixnum>(fix));
TS_ASSERT_EQUALS((native_int)(0UL - 1L) << (FIXNUM_WIDTH-1), fix->to_native());
TS_ASSERT_EQUALS((native_int)((0UL - 1L) << (FIXNUM_WIDTH-1)), fix->to_native());

Integer* max_plus1 = as<Integer>(two->pow(state, width));

@@ -719,7 +719,7 @@ class TestBignum : public CxxTest::TestSuite, public VMTest {
big = as<Integer>(neg_two->pow(state, Fixnum::from(FIXNUM_WIDTH+1)));

TS_ASSERT(kind_of<Bignum>(big));
TS_ASSERT_EQUALS((long long)(0ULL - 1LL) << (FIXNUM_WIDTH+1), as<Bignum>(big)->to_long_long());
TS_ASSERT_EQUALS((long long)((0ULL - 1LL) << (FIXNUM_WIDTH+1)), as<Bignum>(big)->to_long_long());
}

void test_equal() {

0 comments on commit dbac57b

Please sign in to comment.