Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Merge pull request #239 from Tilka/bitfield
BitFieldTest: fix warnings
  • Loading branch information
neobrain committed Apr 19, 2014
2 parents 79df318 + c9405b2 commit 25a0115
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions Source/UnitTests/Common/BitFieldTest.cpp
Expand Up @@ -106,7 +106,7 @@ TEST(BitField, Assignment)
EXPECT_EQ(val, object.full_u64);

object.full_s64 = (s64)val;
EXPECT_EQ((s64)val, object.full_u64);
EXPECT_EQ(val, object.full_u64);

object.regular_field_unsigned = val;
EXPECT_EQ(val & 0x7, object.regular_field_unsigned);
Expand All @@ -121,8 +121,8 @@ TEST(BitField, Assignment)
EXPECT_EQ(((s64)(object.hex << 61)) >> 61, object.regular_field_signed);

// Assignment from other BitField
object.at_dword_boundary = object.regular_field_unsigned;
EXPECT_EQ(object.regular_field_unsigned, object.at_dword_boundary);
object.at_dword_boundary = object.regular_field_signed;
EXPECT_EQ(object.regular_field_signed, object.at_dword_boundary);
}
}

Expand All @@ -148,7 +148,7 @@ TEST(BitField, Alignment)
EXPECT_EQ(val, object.full_u64);

object.full_s64 = (s64)val;
EXPECT_EQ((s64)val, object.full_u64);
EXPECT_EQ(val, object.full_u64);

object.regular_field_unsigned = val;
EXPECT_EQ(val & 0x7, object.regular_field_unsigned);
Expand All @@ -163,7 +163,7 @@ TEST(BitField, Alignment)
EXPECT_EQ(((s64)(object.hex << 61)) >> 61, object.regular_field_signed);

// Assignment from other BitField
object.at_dword_boundary = object.regular_field_unsigned;
EXPECT_EQ(object.regular_field_unsigned, object.at_dword_boundary);
object.at_dword_boundary = object.regular_field_signed;
EXPECT_EQ(object.regular_field_signed, object.at_dword_boundary);
}
}

0 comments on commit 25a0115

Please sign in to comment.