fix compiler warnings

This commit is contained in:
Robert Haschke 2018-10-11 15:22:42 +02:00
parent f1764d0de4
commit 1787a66d37
3 changed files with 11 additions and 11 deletions

View File

@ -457,13 +457,13 @@ TEST(Task, move) {
Task t1("foo"); Task t1("foo");
t1.add(std::make_unique<GeneratorMockup>()); t1.add(std::make_unique<GeneratorMockup>());
t1.add(std::make_unique<GeneratorMockup>()); t1.add(std::make_unique<GeneratorMockup>());
EXPECT_EQ(t1.stages()->numChildren(), 2); EXPECT_EQ(t1.stages()->numChildren(), 2u);
Task t2 = std::move(t1); Task t2 = std::move(t1);
EXPECT_EQ(t2.stages()->numChildren(), 2); EXPECT_EQ(t2.stages()->numChildren(), 2u);
EXPECT_EQ(t1.stages()->numChildren(), 0); EXPECT_EQ(t1.stages()->numChildren(), 0u);
t1 = std::move(t2); t1 = std::move(t2);
EXPECT_EQ(t1.stages()->numChildren(), 2); EXPECT_EQ(t1.stages()->numChildren(), 2u);
EXPECT_EQ(t2.stages()->numChildren(), 0); EXPECT_EQ(t2.stages()->numChildren(), 0u);
} }

View File

@ -49,11 +49,11 @@ TEST(Stage, registerCallbacks) {
auto it = g.addSolutionCallback(cb); auto it = g.addSolutionCallback(cb);
g.compute(); g.compute();
EXPECT_EQ(called, 1); EXPECT_EQ(called, 1u);
g.removeSolutionCallback(it); g.removeSolutionCallback(it);
g.compute(); g.compute();
EXPECT_EQ(called, 1); EXPECT_EQ(called, 1u);
} }
TEST(ComputeIK, init) { TEST(ComputeIK, init) {

View File

@ -76,7 +76,7 @@ protected:
void validate(QAbstractItemModel& model, const std::initializer_list<const char*> &expected) { void validate(QAbstractItemModel& model, const std::initializer_list<const char*> &expected) {
// validate root index // validate root index
ASSERT_EQ(model.rowCount(), expected.size()); ASSERT_EQ(model.rowCount(), static_cast<int>(expected.size()));
EXPECT_EQ(model.columnCount(), 3); EXPECT_EQ(model.columnCount(), 3);
EXPECT_EQ(model.parent(QModelIndex()), QModelIndex()); EXPECT_EQ(model.parent(QModelIndex()), QModelIndex());
@ -84,15 +84,15 @@ protected:
auto it = expected.begin(); auto it = expected.begin();
for (size_t row = 0; row < expected.size(); ++row, ++it) { for (size_t row = 0; row < expected.size(); ++row, ++it) {
QModelIndex idx = model.index(row, 0); QModelIndex idx = model.index(row, 0);
EXPECT_EQ(idx.row(), row); EXPECT_EQ(idx.row(), static_cast<int>(row));
EXPECT_EQ(idx.column(), 0); EXPECT_EQ(idx.column(), 0);
EXPECT_EQ(idx.model(), &model); EXPECT_EQ(idx.model(), &model);
EXPECT_EQ(model.parent(idx), QModelIndex()); EXPECT_EQ(model.parent(idx), QModelIndex());
// validate data // validate data
EXPECT_STREQ(model.data(idx).toByteArray().constData(), *it); EXPECT_STREQ(model.data(idx).toByteArray().constData(), *it);
EXPECT_EQ(model.data(model.index(row, 1)).toUInt(), 0); EXPECT_EQ(model.data(model.index(row, 1)).toUInt(), 0u);
EXPECT_EQ(model.data(model.index(row, 2)).toUInt(), 0); EXPECT_EQ(model.data(model.index(row, 2)).toUInt(), 0u);
// validate children // validate children
ASSERT_EQ(model.rowCount(idx), children); ASSERT_EQ(model.rowCount(idx), children);