tests: Cast container.size() to int for comparison

This commit is contained in:
FeRD (Frank Dana)
2019-12-28 09:48:25 -05:00
parent cbf1f17059
commit dc217a9bdf
2 changed files with 12 additions and 12 deletions

View File

@@ -395,31 +395,31 @@ TEST(CacheDisk_JSON)
// Add some frames (out of order)
std::shared_ptr<Frame> 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<Frame> 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<Frame> 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<Frame> 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<Frame> 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<Frame> 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<Frame> 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<Frame> 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<Frame> 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<Frame> 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());
}

View File

@@ -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());
}