You've already forked libopenshot
mirror of
https://github.com/OpenShot/libopenshot.git
synced 2026-03-02 08:53:52 -08:00
Unit tests: Use == to compare strings (#741)
When there's a mismatch, Catch2 will output the contents of both strings rather than a meaningless .compare() numeric value.
This commit is contained in:
@@ -536,7 +536,7 @@ R"( 1 10.0000
|
||||
999 12345.6777)";
|
||||
|
||||
// Ensure the two strings are equal up to the limits of 'expected'
|
||||
CHECK(output.str().compare(0, expected.size(), expected) == 0);
|
||||
CHECK(output.str().substr(0, expected.size()) == expected);
|
||||
}
|
||||
|
||||
TEST_CASE( "PrintValues", "[libopenshot][keyframe]" )
|
||||
@@ -582,7 +582,7 @@ R"(│Frame# (X) │ Y Value │ Delta Y │ Increasing? │ Repeat Fraction
|
||||
│ 25 │ 16.5446 │ +1 │ true │ Fraction(1, 2) │)";
|
||||
|
||||
// Ensure the two strings are equal up to the limits of 'expected'
|
||||
CHECK(output.str().compare(0, expected.size(), expected) == 0);
|
||||
CHECK(output.str().substr(0, expected.size()) == expected);
|
||||
}
|
||||
|
||||
#ifdef USE_OPENCV
|
||||
|
||||
Reference in New Issue
Block a user