You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@qpid.apache.org by kp...@apache.org on 2020/07/10 12:04:42 UTC
[qpid-proton] branch array-of-lists-first-list-empty updated:
PROTON-2244: Fix for non-linux compilers and non-portable float types
This is an automated email from the ASF dual-hosted git repository.
kpvdr pushed a commit to branch array-of-lists-first-list-empty
in repository https://gitbox.apache.org/repos/asf/qpid-proton.git
The following commit(s) were added to refs/heads/array-of-lists-first-list-empty by this push:
new a8c96ab PROTON-2244: Fix for non-linux compilers and non-portable float types
a8c96ab is described below
commit a8c96ab87d616bde3a19810ceca3acf3b06b8889
Author: Kim van der Riet <kp...@apache.org>
AuthorDate: Fri Jul 10 08:04:26 2020 -0400
PROTON-2244: Fix for non-linux compilers and non-portable float types
---
c/tests/data_test.cpp | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/c/tests/data_test.cpp b/c/tests/data_test.cpp
index 2bb0b5f..b2485d2 100644
--- a/c/tests/data_test.cpp
+++ b/c/tests/data_test.cpp
@@ -25,10 +25,10 @@
#include <proton/codec.h>
#include <proton/error.h>
+#include <proton/type_compat.h> // ssize_t
#include <cstdarg> // va_start(), va_end()
#include <ctime> // time()
-#include <unistd.h> // ssize_t
using namespace pn_test;
@@ -196,12 +196,12 @@ TEST_CASE("array_timestamp") {
TEST_CASE("array_float") {
check_array("@T[]", PN_FLOAT);
- check_array("@T[fffff]", PN_FLOAT, float(0.0), float(3.14), std::nanf, std::numeric_limits<float>::infinity(), -std::numeric_limits<float>::infinity());
+ check_array("@T[fff]", PN_FLOAT, float(0.0), float(3.14), float(1.234e56), float(-1.234e-56));
}
TEST_CASE("array_double") {
check_array("@T[]", PN_DOUBLE);
- check_array("@T[ddddd]", PN_DOUBLE, double(0.0), double(3.1416), std::nan, std::numeric_limits<double>::infinity(), -std::numeric_limits<double>::infinity());
+ check_array("@T[ddd]", PN_DOUBLE, double(0.0), double(3.1416), double(1.234e56), double(-1.234e-56));
}
TEST_CASE("array_binary") {
@@ -230,7 +230,7 @@ TEST_CASE("array_array") {
TEST_CASE("array_list") {
check_array("@T[]", PN_LIST);
// TODO: PROTON-2248: using S and s reversed
- check_array("@T[[][oo][][iii][Sosid]]", PN_LIST, true, false, 1, 2, 3, "hello", false, "world", 43210, 2.565);
+ check_array("@T[[][oo][][iii][Sosid]]", PN_LIST, true, false, 1, 2, 3, "hello", false, "world", 43210, 2.565e-56);
}
TEST_CASE("array_map") {
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@qpid.apache.org
For additional commands, e-mail: commits-help@qpid.apache.org