Skip to content

Commit 9e46c3f

Browse files
Erdkdoyubkim
authored andcommitted
Fix to error at comparing signed and unsigned integers (#97)
In animation_tests.cpp Frame.index (which is signed integer) is compared with integer literals with 'u' at the end, making them unsigned integers. GCC6.x treats such comparison as error (at least with flags set in CMakeLists.txt). This patch just removes 'u' from literals, allowing the build to pass with GCC6.
1 parent 25a8914 commit 9e46c3f

1 file changed

Lines changed: 6 additions & 6 deletions

File tree

src/tests/unit_tests/animation_tests.cpp

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ using namespace jet;
1111

1212
TEST(Frame, Constructors) {
1313
Frame frame;
14-
EXPECT_EQ(0u, frame.index);
14+
EXPECT_EQ(0, frame.index);
1515
EXPECT_DOUBLE_EQ(1.0 / 60.0, frame.timeIntervalInSeconds);
1616
}
1717

@@ -32,15 +32,15 @@ TEST(Frame, Advance) {
3232
frame.advance();
3333
}
3434

35-
EXPECT_EQ(54u, frame.index);
35+
EXPECT_EQ(54, frame.index);
3636

3737
frame.advance(23);
3838

39-
EXPECT_EQ(77u, frame.index);
39+
EXPECT_EQ(77, frame.index);
4040

41-
EXPECT_EQ(78u, (++frame).index);
41+
EXPECT_EQ(78, (++frame).index);
4242

43-
EXPECT_EQ(78u, (frame++).index);
43+
EXPECT_EQ(78, (frame++).index);
4444

45-
EXPECT_EQ(79u, frame.index);
45+
EXPECT_EQ(79, frame.index);
4646
}

0 commit comments

Comments
 (0)