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

bneradt pushed a commit to branch dev-1-0-10
in repository https://gitbox.apache.org/repos/asf/trafficserver-libswoc.git

commit 73955d81f6d7a04a9cadda1958fb796254e0b4b0
Author: Alan M. Carroll <[email protected]>
AuthorDate: Thu Jan 30 12:45:03 2020 -0600

    Fix unit test problems.
---
 swoc++/include/swoc/DiscreteRange.h | 2 +-
 unit_tests/ex_TextView.cc           | 4 ++--
 unit_tests/test_swoc_file.cc        | 2 +-
 unit_tests/unit_tests.part          | 4 ++--
 4 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/swoc++/include/swoc/DiscreteRange.h 
b/swoc++/include/swoc/DiscreteRange.h
index 21d177e..6838b14 100644
--- a/swoc++/include/swoc/DiscreteRange.h
+++ b/swoc++/include/swoc/DiscreteRange.h
@@ -101,7 +101,7 @@ public:
   using metric_type = T;
   using Relation = DiscreteRangeRelation;
 
-  static constexpr self_type ALL{detail::minimum<metric_type>(), 
detail::maximum<metric_type>()};
+//  static constexpr self_type ALL{detail::minimum<metric_type>(), 
detail::maximum<metric_type>()};
 
   /** Default constructor.
       An empty range is constructed.
diff --git a/unit_tests/ex_TextView.cc b/unit_tests/ex_TextView.cc
index 0894a1e..b6b3b25 100644
--- a/unit_tests/ex_TextView.cc
+++ b/unit_tests/ex_TextView.cc
@@ -202,7 +202,7 @@ TEST_CASE("TextView Tokens", 
"[libswoc][example][textview][tokens]")
 
 TEST_CASE("TextView Lines", "[libswoc][example][textview][lines]")
 {
-  swoc::file::path path{"../doc/conf.py"};
+  swoc::file::path path{"doc/conf.py"};
   std::error_code ec;
 
   auto content   = swoc::file::load(path, ec);
@@ -240,7 +240,7 @@ TEST_CASE("TextView parsing", 
"[libswoc][example][text][parsing]") {
   swoc::IP4Addr addr;
 
   std::error_code ec;
-  auto data { swoc::file::load("../unit_tests/examples/resolver.txt"_tv, ec) };
+  auto data { swoc::file::load("unit_tests/examples/resolver.txt"_tv, ec) };
   REQUIRE(data.size() > 2); // if this fails, there's something wrong with the 
path or current directory.
 
   TextView content { data };
diff --git a/unit_tests/test_swoc_file.cc b/unit_tests/test_swoc_file.cc
index b60a616..a3f403c 100644
--- a/unit_tests/test_swoc_file.cc
+++ b/unit_tests/test_swoc_file.cc
@@ -47,7 +47,7 @@ TEST_CASE("swoc_file", "[libts][swoc_file]")
 
 TEST_CASE("swoc_file_io", "[libts][swoc_file_io]")
 {
-  path file("../unit_tests/test_swoc_file.cc");
+  path file("unit_tests/test_swoc_file.cc");
   std::error_code ec;
   std::string content = swoc::file::load(file, ec);
   REQUIRE(ec.value() == 0);
diff --git a/unit_tests/unit_tests.part b/unit_tests/unit_tests.part
index 8f9b304..fd2115e 100644
--- a/unit_tests/unit_tests.part
+++ b/unit_tests/unit_tests.part
@@ -7,7 +7,7 @@ DependsOn([
     ])
 
 env.AppendUnique(
-    CCFLAGS=['-std=c++17'],    
+    CCFLAGS=['-std=c++17'],
 )
 
 files = [
@@ -35,6 +35,6 @@ env.UnitTest(
     "tests",
     files,
     # data file we need for the test to pass
-    
data_src=[Pattern(src_dir="#",includes=['doc/conf.py','unit_tests/test_swoc_file.cc'])]
+    
data_src=[Pattern(src_dir="#",includes=['doc/conf.py','unit_tests/examples/resolver.txt',
 'unit_tests/test_swoc_file.cc'])]
     )
 

Reply via email to