You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@trafficserver.apache.org by zw...@apache.org on 2019/11/18 03:36:52 UTC

[trafficserver] branch master updated: Fix compile warnings in Catch checks for TextView (#6186)

This is an automated email from the ASF dual-hosted git repository.

zwoop pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/trafficserver.git


The following commit(s) were added to refs/heads/master by this push:
     new e328141  Fix compile warnings in Catch checks for TextView (#6186)
e328141 is described below

commit e32814144f6f251074eb0ba567860e64e5f30edd
Author: Leif Hedstrom <zw...@apache.org>
AuthorDate: Mon Nov 18 11:36:42 2019 +0800

    Fix compile warnings in Catch checks for TextView (#6186)
---
 src/tscpp/util/unit_tests/test_TextView.cc | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/tscpp/util/unit_tests/test_TextView.cc b/src/tscpp/util/unit_tests/test_TextView.cc
index 8b9131e..4810733 100644
--- a/src/tscpp/util/unit_tests/test_TextView.cc
+++ b/src/tscpp/util/unit_tests/test_TextView.cc
@@ -36,10 +36,8 @@ TEST_CASE("TextView Constructor", "[libts][TextView]")
 {
   static std::string base = "Evil Dave Rulez!";
   TextView tv(base);
-  TextView a{"Evil Dave Rulez"};
   TextView b{base.data(), base.size()};
   TextView c{std::string_view(base)};
-  constexpr TextView d{"Grigor!"sv};
 }
 
 TEST_CASE("TextView Operations", "[libts][TextView]")
@@ -111,6 +109,8 @@ TEST_CASE("TextView Affixes", "[libts][TextView]")
   left         = tv3;
   right        = left.split_suffix_at(";:,");
   TextView pre{tv3}, post{pre.split_suffix_at(7)};
+
+  REQUIRE(post.size() == 7);
   REQUIRE(right.size() == 7);
   REQUIRE(left.size() == 7);
   REQUIRE(left == "abcdefg");