Apply patch for int->float test failure

epel9
Daiki Ueno 11 years ago
parent 1d402c8e43
commit 9eab9dc3c3

@ -0,0 +1,30 @@
From c203928fae924e017f39afb2723414d458fc01a1 Mon Sep 17 00:00:00 2001
From: Daiki Ueno <ueno@gnu.org>
Date: Thu, 17 Jul 2014 18:38:04 +0900
Subject: [PATCH] Fix test failure regarding int->float conversion
Supply only small integers (< 1^24) to int->float conversion tests,
so they can roundtrip without error.
---
test/msgpack_test.cpp | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/test/msgpack_test.cpp b/test/msgpack_test.cpp
index fb35c68..6917caf 100644
--- a/test/msgpack_test.cpp
+++ b/test/msgpack_test.cpp
@@ -201,10 +201,8 @@ TYPED_TEST_P(IntegerToFloatingPointTest, simple_buffer)
v.push_back(1);
if (numeric_limits<integer_type>::is_signed) v.push_back(-1);
else v.push_back(2);
- v.push_back(numeric_limits<integer_type>::min());
- v.push_back(numeric_limits<integer_type>::max());
for (unsigned int i = 0; i < kLoop; i++) {
- v.push_back(rand());
+ v.push_back(rand() % 0x7FFFFF);
}
for (unsigned int i = 0; i < v.size() ; i++) {
msgpack::sbuffer sbuf;
--
1.9.3

@ -7,6 +7,7 @@ Group: System Environment/Libraries
License: ASL 2.0
URL: http://msgpack.org
Source0: https://github.com/msgpack/msgpack-c/releases/download/cpp-%{version}/%{name}-%{version}.tar.gz
Patch0: msgpack-fix-int-float-test.patch
# for regenerating configure
BuildRequires: libtool
@ -31,6 +32,7 @@ Libraries and header files for %{name}
%prep
%setup -q
%patch0 -p1 -b .fix-int-float-test
%build
@ -66,6 +68,7 @@ find $RPM_BUILD_ROOT -name '*.la' -exec rm -f '{}' ';'
%changelog
* Fri Jul 11 2014 Daiki Ueno <dueno@redhat.com> - 0.5.9-1
- new upstream release
- apply patch to fix int->float test failure
* Sat Jun 07 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.5.8-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild

Loading…
Cancel
Save