[mathicgb] 01/01: Modify test so that it will compile under clang.

Doug Torrance dtorrance-guest at moszumanska.debian.org
Wed Jan 11 01:16:15 UTC 2017


This is an automated email from the git hooks/post-receive script.

dtorrance-guest pushed a commit to branch upstream
in repository mathicgb.

commit 068ed9d82b29332bfc7c350b77ffcacf1da4beeb
Author: Mike Stillman <mikestillman1 at gmail.com>
Date:   Wed Jan 4 16:30:07 2017 -0500

    Modify test so that it will compile under clang.
    
    The offending code is there still, commented out.  I'm not sure if it is a c++ standard issue with template substitution, or a bug in clang.  In any case, we do not use the features that were being tested.
---
 src/test/Range.cpp | 18 ++++++++++++++----
 1 file changed, 14 insertions(+), 4 deletions(-)

diff --git a/src/test/Range.cpp b/src/test/Range.cpp
index 474db10..00f1dd9 100755
--- a/src/test/Range.cpp
+++ b/src/test/Range.cpp
@@ -140,11 +140,21 @@ TEST(Range, indexRange) {
   );
 }
 
-
 TEST(Range, oppositePairRange) {
-  std::string strs[] = {"hello", "world", "!"};
-  const auto r = zip(strs, intRange(10));
-  const auto opR = zip(intRange(3), strs);
+  /// MES: The following commented out code using arrays, and
+  /// iterators/ranges of them, fails to compile on clang, 1 Jan 2017
+  /// (clang version 3.8, and also on earlier versions of clang):
+  //  std::string strs[] = {"hello", "world", "!"};
+  //  const auto r = zip(strs, intRange(10));
+  //  const auto opR = zip(intRange(3), strs);
+  //  ASSERT_EQ(rangeToVector(r), rangeToVector(oppositePairRange(opR)));
+  //  ASSERT_EQ(
+  //    rangeToVector(opR),
+  //    rangeToVector(oppositePairRange(std::begin(r), std::end(r)))
+  //  );
+  const auto int3 = intRange(3,6);
+  const auto r = zip(int3, intRange(10));
+  const auto opR = zip(intRange(3), int3);
   ASSERT_EQ(rangeToVector(r), rangeToVector(oppositePairRange(opR)));
   ASSERT_EQ(
     rangeToVector(opR),

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-science/packages/mathicgb.git



More information about the debian-science-commits mailing list