From 558dd20585223baf1dfbe1bbe88e352334239ef5 Mon Sep 17 00:00:00 2001 From: Bent Bisballe Nyeng Date: Thu, 2 Jun 2016 21:11:47 +0200 Subject: Fix test compilation on 64 bit. --- test/imagecachetest.cc | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) (limited to 'test') diff --git a/test/imagecachetest.cc b/test/imagecachetest.cc index 2a5b6ed..9321cf0 100644 --- a/test/imagecachetest.cc +++ b/test/imagecachetest.cc @@ -62,35 +62,35 @@ public: void refCountTest() { TestableImageCache imageCache; - CPPUNIT_ASSERT_EQUAL(imageCache.count("foo"), 0u); - CPPUNIT_ASSERT_EQUAL(imageCache.count("bar"), 0u); + CPPUNIT_ASSERT_EQUAL(imageCache.count("foo"), std::size_t(0u)); + CPPUNIT_ASSERT_EQUAL(imageCache.count("bar"), std::size_t(0u)); { auto image1{imageCache.getImage("foo")}; (void)image1; - CPPUNIT_ASSERT_EQUAL(imageCache.count("foo"), 1u); - CPPUNIT_ASSERT_EQUAL(imageCache.count("bar"), 0u); + CPPUNIT_ASSERT_EQUAL(imageCache.count("foo"), std::size_t(1u)); + CPPUNIT_ASSERT_EQUAL(imageCache.count("bar"), std::size_t(0u)); auto image2 = imageCache.getImage("bar"); - CPPUNIT_ASSERT_EQUAL(imageCache.count("foo"), 1u); - CPPUNIT_ASSERT_EQUAL(imageCache.count("bar"), 1u); + CPPUNIT_ASSERT_EQUAL(imageCache.count("foo"), std::size_t(1u)); + CPPUNIT_ASSERT_EQUAL(imageCache.count("bar"), std::size_t(1u)); auto image3 = imageCache.getImage("foo"); - CPPUNIT_ASSERT_EQUAL(imageCache.count("foo"), 2u); - CPPUNIT_ASSERT_EQUAL(imageCache.count("bar"), 1u); + CPPUNIT_ASSERT_EQUAL(imageCache.count("foo"), std::size_t(2u)); + CPPUNIT_ASSERT_EQUAL(imageCache.count("bar"), std::size_t(1u)); { auto image4 = imageCache.getImage("foo"); - CPPUNIT_ASSERT_EQUAL(imageCache.count("foo"), 3u); - CPPUNIT_ASSERT_EQUAL(imageCache.count("bar"), 1u); + CPPUNIT_ASSERT_EQUAL(imageCache.count("foo"), std::size_t(3u)); + CPPUNIT_ASSERT_EQUAL(imageCache.count("bar"), std::size_t(1u)); } - CPPUNIT_ASSERT_EQUAL(imageCache.count("foo"), 2u); - CPPUNIT_ASSERT_EQUAL(imageCache.count("bar"), 1u); + CPPUNIT_ASSERT_EQUAL(imageCache.count("foo"), std::size_t(2u)); + CPPUNIT_ASSERT_EQUAL(imageCache.count("bar"), std::size_t(1u)); } - CPPUNIT_ASSERT_EQUAL(imageCache.count("foo"), 0u); - CPPUNIT_ASSERT_EQUAL(imageCache.count("bar"), 0u); + CPPUNIT_ASSERT_EQUAL(imageCache.count("foo"), std::size_t(0u)); + CPPUNIT_ASSERT_EQUAL(imageCache.count("bar"), std::size_t(0u)); } }; -- cgit v1.2.3