From dc217a9bdfade96d24e398cf6b833e65d1d500c0 Mon Sep 17 00:00:00 2001 From: "FeRD (Frank Dana)" Date: Sat, 28 Dec 2019 09:48:25 -0500 Subject: [PATCH] tests: Cast container.size() to int for comparison --- tests/Cache_Tests.cpp | 20 ++++++++++---------- tests/Clip_Tests.cpp | 4 ++-- 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/tests/Cache_Tests.cpp b/tests/Cache_Tests.cpp index ea5b45ce..ddf698f5 100644 --- a/tests/Cache_Tests.cpp +++ b/tests/Cache_Tests.cpp @@ -395,31 +395,31 @@ TEST(CacheDisk_JSON) // Add some frames (out of order) std::shared_ptr f3(new Frame(3, 1280, 720, "Blue", 500, 2)); c.Add(f3); - CHECK_EQUAL(1, c.JsonValue()["ranges"].size()); + CHECK_EQUAL(1, (int)c.JsonValue()["ranges"].size()); CHECK_EQUAL("1", c.JsonValue()["version"].asString()); // Add some frames (out of order) std::shared_ptr f1(new Frame(1, 1280, 720, "Blue", 500, 2)); c.Add(f1); - CHECK_EQUAL(2, c.JsonValue()["ranges"].size()); + CHECK_EQUAL(2, (int)c.JsonValue()["ranges"].size()); CHECK_EQUAL("2", c.JsonValue()["version"].asString()); // Add some frames (out of order) std::shared_ptr f2(new Frame(2, 1280, 720, "Blue", 500, 2)); c.Add(f2); - CHECK_EQUAL(1, c.JsonValue()["ranges"].size()); + CHECK_EQUAL(1, (int)c.JsonValue()["ranges"].size()); CHECK_EQUAL("3", c.JsonValue()["version"].asString()); // Add some frames (out of order) std::shared_ptr f5(new Frame(5, 1280, 720, "Blue", 500, 2)); c.Add(f5); - CHECK_EQUAL(2, c.JsonValue()["ranges"].size()); + CHECK_EQUAL(2, (int)c.JsonValue()["ranges"].size()); CHECK_EQUAL("4", c.JsonValue()["version"].asString()); // Add some frames (out of order) std::shared_ptr f4(new Frame(4, 1280, 720, "Blue", 500, 2)); c.Add(f4); - CHECK_EQUAL(1, c.JsonValue()["ranges"].size()); + CHECK_EQUAL(1, (int)c.JsonValue()["ranges"].size()); CHECK_EQUAL("5", c.JsonValue()["version"].asString()); // Delete cache directory @@ -435,31 +435,31 @@ TEST(CacheMemory_JSON) // Add some frames (out of order) std::shared_ptr f3(new Frame(3, 1280, 720, "Blue", 500, 2)); c.Add(f3); - CHECK_EQUAL(1, c.JsonValue()["ranges"].size()); + CHECK_EQUAL(1, (int)c.JsonValue()["ranges"].size()); CHECK_EQUAL("1", c.JsonValue()["version"].asString()); // Add some frames (out of order) std::shared_ptr f1(new Frame(1, 1280, 720, "Blue", 500, 2)); c.Add(f1); - CHECK_EQUAL(2, c.JsonValue()["ranges"].size()); + CHECK_EQUAL(2, (int)c.JsonValue()["ranges"].size()); CHECK_EQUAL("2", c.JsonValue()["version"].asString()); // Add some frames (out of order) std::shared_ptr f2(new Frame(2, 1280, 720, "Blue", 500, 2)); c.Add(f2); - CHECK_EQUAL(1, c.JsonValue()["ranges"].size()); + CHECK_EQUAL(1, (int)c.JsonValue()["ranges"].size()); CHECK_EQUAL("3", c.JsonValue()["version"].asString()); // Add some frames (out of order) std::shared_ptr f5(new Frame(5, 1280, 720, "Blue", 500, 2)); c.Add(f5); - CHECK_EQUAL(2, c.JsonValue()["ranges"].size()); + CHECK_EQUAL(2, (int)c.JsonValue()["ranges"].size()); CHECK_EQUAL("4", c.JsonValue()["version"].asString()); // Add some frames (out of order) std::shared_ptr f4(new Frame(4, 1280, 720, "Blue", 500, 2)); c.Add(f4); - CHECK_EQUAL(1, c.JsonValue()["ranges"].size()); + CHECK_EQUAL(1, (int)c.JsonValue()["ranges"].size()); CHECK_EQUAL("5", c.JsonValue()["version"].asString()); } diff --git a/tests/Clip_Tests.cpp b/tests/Clip_Tests.cpp index 711fef03..c66cc9a4 100644 --- a/tests/Clip_Tests.cpp +++ b/tests/Clip_Tests.cpp @@ -241,7 +241,7 @@ TEST(Clip_Effects) CHECK_EQUAL(255, (int)pixels[pixel_index + 3]); // Check the # of Effects - CHECK_EQUAL(1, c10.Effects().size()); + CHECK_EQUAL(1, (int)c10.Effects().size()); // Add a 2nd negate effect @@ -262,5 +262,5 @@ TEST(Clip_Effects) CHECK_EQUAL(255, (int)pixels[pixel_index + 3]); // Check the # of Effects - CHECK_EQUAL(2, c10.Effects().size()); + CHECK_EQUAL(2, (int)c10.Effects().size()); }