You've already forked libopenshot
mirror of
https://github.com/OpenShot/libopenshot.git
synced 2026-03-02 08:53:52 -08:00
tests: Cast container.size() to int for comparison
This commit is contained in:
@@ -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());
|
||||
|
||||
}
|
||||
|
||||
@@ -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());
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user