[mathicgb] 04/05: debian/patches/fix_archs_with_unsigned_char.patch: Fix failing tests for architectures which default to unsigned char.

Doug Torrance dtorrance-guest at moszumanska.debian.org
Sat Jul 18 21:07:33 UTC 2015


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

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

commit 9c81fa4efa049e71e3bceeac66e0b5788635e847
Author: Doug Torrance <dtorrance at monmouthcollege.edu>
Date:   Sat Jul 18 12:49:47 2015 -0600

    debian/patches/fix_archs_with_unsigned_char.patch: Fix failing tests for
    architectures which default to unsigned char.
---
 debian/patches/fix_archs_with_unsigned_char.patch | 34 +++++++++++++++++++++++
 debian/patches/series                             |  1 +
 2 files changed, 35 insertions(+)

diff --git a/debian/patches/fix_archs_with_unsigned_char.patch b/debian/patches/fix_archs_with_unsigned_char.patch
new file mode 100644
index 0000000..33aca5c
--- /dev/null
+++ b/debian/patches/fix_archs_with_unsigned_char.patch
@@ -0,0 +1,34 @@
+Description: Fix failing tests for architectures which default to unsigned char.
+Author: Doug Torrance <dtorrance at monmouthcollege.edu>
+Last-Update: 2015-07-18
+
+--- a/src/test/PrimeField.cpp
++++ b/src/test/PrimeField.cpp
+@@ -59,9 +59,9 @@
+     toString(pf.toElement(std::numeric_limits<int>::min())));
+ 
+   // Fewer number of bits (8)
+-  ASSERT_EQ("127", toString(pf.toElement(std::numeric_limits<char>::max())));
++  ASSERT_EQ("127", toString(pf.toElement(std::numeric_limits<signed char>::max())));
+   ASSERT_EQ("4294967163",
+-    toString(pf.toElement(std::numeric_limits<char>::min())));
++    toString(pf.toElement(std::numeric_limits<signed char>::min())));
+ 
+   ASSERT_EQ("255",
+     toString(pf.toElement(std::numeric_limits<unsigned char>::max())));
+--- a/src/test/Scanner.cpp
++++ b/src/test/Scanner.cpp
+@@ -102,10 +102,10 @@
+   ASSERT_EQ(0, in.readInteger<unsigned char>());
+   ASSERT_EQ(0, in.readInteger<char>());
+   ASSERT_EQ(1, in.readInteger<char>());
+-  ASSERT_EQ(-1, in.readInteger<char>());
++  ASSERT_EQ(-1, in.readInteger<signed char>());
+   ASSERT_EQ(127, in.readInteger<char>());
+-  ASSERT_EQ(-128, in.readInteger<char>());
+-  ASSERT_EQ(-128, in.readInteger<char>(true));
++  ASSERT_EQ(-128, in.readInteger<signed char>());
++  ASSERT_EQ(-128, in.readInteger<signed char>(true));
+ }
+ 
+ TEST(Scanner, WhiteAndLineCount) {
diff --git a/debian/patches/series b/debian/patches/series
index 834899f..b2e2a98 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1,2 +1,3 @@
 find_gtest.patch
 link_pthread.patch
+fix_archs_with_unsigned_char.patch

-- 
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