Skip to content

Commit dc217a9

Browse files
committed
tests: Cast container.size() to int for comparison
1 parent cbf1f17 commit dc217a9

File tree

2 files changed

+12
-12
lines changed

2 files changed

+12
-12
lines changed

tests/Cache_Tests.cpp

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -395,31 +395,31 @@ TEST(CacheDisk_JSON)
395395
// Add some frames (out of order)
396396
std::shared_ptr<Frame> f3(new Frame(3, 1280, 720, "Blue", 500, 2));
397397
c.Add(f3);
398-
CHECK_EQUAL(1, c.JsonValue()["ranges"].size());
398+
CHECK_EQUAL(1, (int)c.JsonValue()["ranges"].size());
399399
CHECK_EQUAL("1", c.JsonValue()["version"].asString());
400400

401401
// Add some frames (out of order)
402402
std::shared_ptr<Frame> f1(new Frame(1, 1280, 720, "Blue", 500, 2));
403403
c.Add(f1);
404-
CHECK_EQUAL(2, c.JsonValue()["ranges"].size());
404+
CHECK_EQUAL(2, (int)c.JsonValue()["ranges"].size());
405405
CHECK_EQUAL("2", c.JsonValue()["version"].asString());
406406

407407
// Add some frames (out of order)
408408
std::shared_ptr<Frame> f2(new Frame(2, 1280, 720, "Blue", 500, 2));
409409
c.Add(f2);
410-
CHECK_EQUAL(1, c.JsonValue()["ranges"].size());
410+
CHECK_EQUAL(1, (int)c.JsonValue()["ranges"].size());
411411
CHECK_EQUAL("3", c.JsonValue()["version"].asString());
412412

413413
// Add some frames (out of order)
414414
std::shared_ptr<Frame> f5(new Frame(5, 1280, 720, "Blue", 500, 2));
415415
c.Add(f5);
416-
CHECK_EQUAL(2, c.JsonValue()["ranges"].size());
416+
CHECK_EQUAL(2, (int)c.JsonValue()["ranges"].size());
417417
CHECK_EQUAL("4", c.JsonValue()["version"].asString());
418418

419419
// Add some frames (out of order)
420420
std::shared_ptr<Frame> f4(new Frame(4, 1280, 720, "Blue", 500, 2));
421421
c.Add(f4);
422-
CHECK_EQUAL(1, c.JsonValue()["ranges"].size());
422+
CHECK_EQUAL(1, (int)c.JsonValue()["ranges"].size());
423423
CHECK_EQUAL("5", c.JsonValue()["version"].asString());
424424

425425
// Delete cache directory
@@ -435,31 +435,31 @@ TEST(CacheMemory_JSON)
435435
// Add some frames (out of order)
436436
std::shared_ptr<Frame> f3(new Frame(3, 1280, 720, "Blue", 500, 2));
437437
c.Add(f3);
438-
CHECK_EQUAL(1, c.JsonValue()["ranges"].size());
438+
CHECK_EQUAL(1, (int)c.JsonValue()["ranges"].size());
439439
CHECK_EQUAL("1", c.JsonValue()["version"].asString());
440440

441441
// Add some frames (out of order)
442442
std::shared_ptr<Frame> f1(new Frame(1, 1280, 720, "Blue", 500, 2));
443443
c.Add(f1);
444-
CHECK_EQUAL(2, c.JsonValue()["ranges"].size());
444+
CHECK_EQUAL(2, (int)c.JsonValue()["ranges"].size());
445445
CHECK_EQUAL("2", c.JsonValue()["version"].asString());
446446

447447
// Add some frames (out of order)
448448
std::shared_ptr<Frame> f2(new Frame(2, 1280, 720, "Blue", 500, 2));
449449
c.Add(f2);
450-
CHECK_EQUAL(1, c.JsonValue()["ranges"].size());
450+
CHECK_EQUAL(1, (int)c.JsonValue()["ranges"].size());
451451
CHECK_EQUAL("3", c.JsonValue()["version"].asString());
452452

453453
// Add some frames (out of order)
454454
std::shared_ptr<Frame> f5(new Frame(5, 1280, 720, "Blue", 500, 2));
455455
c.Add(f5);
456-
CHECK_EQUAL(2, c.JsonValue()["ranges"].size());
456+
CHECK_EQUAL(2, (int)c.JsonValue()["ranges"].size());
457457
CHECK_EQUAL("4", c.JsonValue()["version"].asString());
458458

459459
// Add some frames (out of order)
460460
std::shared_ptr<Frame> f4(new Frame(4, 1280, 720, "Blue", 500, 2));
461461
c.Add(f4);
462-
CHECK_EQUAL(1, c.JsonValue()["ranges"].size());
462+
CHECK_EQUAL(1, (int)c.JsonValue()["ranges"].size());
463463
CHECK_EQUAL("5", c.JsonValue()["version"].asString());
464464

465465
}

tests/Clip_Tests.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -241,7 +241,7 @@ TEST(Clip_Effects)
241241
CHECK_EQUAL(255, (int)pixels[pixel_index + 3]);
242242

243243
// Check the # of Effects
244-
CHECK_EQUAL(1, c10.Effects().size());
244+
CHECK_EQUAL(1, (int)c10.Effects().size());
245245

246246

247247
// Add a 2nd negate effect
@@ -262,5 +262,5 @@ TEST(Clip_Effects)
262262
CHECK_EQUAL(255, (int)pixels[pixel_index + 3]);
263263

264264
// Check the # of Effects
265-
CHECK_EQUAL(2, c10.Effects().size());
265+
CHECK_EQUAL(2, (int)c10.Effects().size());
266266
}

0 commit comments

Comments
 (0)