Skip to content

Commit

Permalink
Fix sign-compare.
Browse files Browse the repository at this point in the history
  • Loading branch information
chantera committed Jan 4, 2019
1 parent cbb0d31 commit 566727a
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions test/cuda_memory_pool_test.cc
Expand Up @@ -135,9 +135,9 @@ TEST_F(MemoryPoolTest_CUDA, CheckAllocatedSize) {
size <<= 1;
}

EXPECT_GT(allocated_size, 0);
EXPECT_GT(allocated_size, 0u);
EXPECT_THROW(pool.allocate(size << 1, &allocated_size), Error);
EXPECT_EQ(allocated_size, 0);
EXPECT_EQ(allocated_size, 0u);
}

TEST_F(MemoryPoolTest_CUDA, CheckAllocatedSizeWithMinimumSize) {
Expand Down
6 changes: 3 additions & 3 deletions test/tensor_test.cc
Expand Up @@ -45,7 +45,7 @@ vector<Device *> TensorTest::devices;
const std::size_t required_memsize = x.shape().size() * type_size; \
EXPECT_GE(x.allocated_size(), required_memsize); \
} else { \
EXPECT_EQ(x.allocated_size(), 0); \
EXPECT_EQ(x.allocated_size(), 0u); \
} \
}

Expand Down Expand Up @@ -129,14 +129,14 @@ TEST_F(TensorTest, CheckAllocatedSize) {

Tensor y;
EXPECT_FALSE(y.valid());
EXPECT_EQ(y.allocated_size(), 0);
EXPECT_EQ(y.allocated_size(), 0u);
y = std::move(x);
EXPECT_TRUE(y.valid());
EXPECT_EQ(dev, &y.device());
EXPECT_TRUE(vector_match(data, y.to_vector()));
EXPECT_GE(y.allocated_size(), required_memsize);
y.invalidate();
EXPECT_EQ(y.allocated_size(), 0);
EXPECT_EQ(y.allocated_size(), 0u);
}
}
}
Expand Down

0 comments on commit 566727a

Please sign in to comment.