Skip to content

Commit

Permalink
Check class size
Browse files Browse the repository at this point in the history
  • Loading branch information
leeopop committed Jan 22, 2016
1 parent defdf08 commit 7f99ef1
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions tests/test_core_shiftedint.cc
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,10 @@ using namespace nba;

typedef ShiftedInt<uint16_t, 4> TestInt;

TEST(CoreShiftedIntTest, ClassSize) {
EXPECT_EQ(sizeof(TestInt), sizeof(uint16_t));
}

TEST(CoreShiftedIntTest, Precision_Create) {
EXPECT_THROW(TestInt(1), PrecisionLossException);
EXPECT_THROW(TestInt(1164032), PrecisionLossException);
Expand Down

0 comments on commit 7f99ef1

Please sign in to comment.