Skip to content

Commit

Permalink
tests: silence more "-Werror=sign-compare" warnings
Browse files Browse the repository at this point in the history
Signed-off-by: Kefu Chai <[email protected]>
Message-Id: <[email protected]>
  • Loading branch information
tchaikov authored and avikivity committed Jul 9, 2018
1 parent baa9d24 commit 2294749
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions tests/sstring_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -44,17 +44,17 @@ BOOST_AUTO_TEST_CASE(test_add_literal_to_sstring) {
}

BOOST_AUTO_TEST_CASE(test_find_sstring) {
BOOST_REQUIRE_EQUAL(sstring("abcde").find('b'), 1);
BOOST_REQUIRE_EQUAL(sstring("babcde").find('b',1), 2);
BOOST_REQUIRE_EQUAL(sstring("abcde").find('b'), 1u);
BOOST_REQUIRE_EQUAL(sstring("babcde").find('b',1), 2u);
}

BOOST_AUTO_TEST_CASE(test_not_find_sstring) {
BOOST_REQUIRE_EQUAL(sstring("abcde").find('x'), sstring::npos);
}

BOOST_AUTO_TEST_CASE(test_str_find_sstring) {
BOOST_REQUIRE_EQUAL(sstring("abcde").find("bc"), 1);
BOOST_REQUIRE_EQUAL(sstring("abcbcde").find("bc", 2), 3);
BOOST_REQUIRE_EQUAL(sstring("abcde").find("bc"), 1u);
BOOST_REQUIRE_EQUAL(sstring("abcbcde").find("bc", 2), 3u);
}

BOOST_AUTO_TEST_CASE(test_str_not_find_sstring) {
Expand Down

0 comments on commit 2294749

Please sign in to comment.