Skip to content

Commit a90bd1e

Browse files
committed
Apply +0.0,-0.0,0.0 to relevant test cases
1 parent c8c66e1 commit a90bd1e

File tree

1 file changed

+16
-16
lines changed

1 file changed

+16
-16
lines changed

cpp/src/arrow/sparse_tensor_test.cc

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -423,7 +423,7 @@ class TestSparseCOOTensorCreationFromNegativeZero
423423

424424
void FromVector() {
425425
std::vector<ValueCType> data{
426-
-0.0, -0.0, -0.0, -0.0, 4.0, -0.0, -0.0, -0.0, -0.0, -1.0, -0.0, -0.0,
426+
-0.0, -0.0, 0.0, -0.0, 4.0, +0.0, -0.0, -0.0, -0.0, -1.0, 0.0, -0.0,
427427
};
428428
std::vector<int64_t> shape = {12};
429429
auto buffer = Buffer::FromVector(data);
@@ -442,9 +442,9 @@ class TestSparseCOOTensorCreationFromNegativeZero
442442
void FromContiguousTensor() {
443443
// clang-format off
444444
std::vector<ValueCType> data{
445-
-0.0, -0.0, -0.0,
446-
-0.0, 4.0, -0.0,
447-
-0.0, -0.0, -0.0,
445+
-0.0, 0.0, -0.0,
446+
+0.0, 4.0, -0.0,
447+
-0.0, -0.0, 0.0,
448448
-1.0, -0.0, -0.0,
449449
};
450450
// clang-format on
@@ -465,10 +465,10 @@ class TestSparseCOOTensorCreationFromNegativeZero
465465
void FromNonContiguousTensor() {
466466
// clang-format off
467467
std::vector<ValueCType> data{
468-
-0.0, -0.0, -0.0, 1.0, 2.0,
469-
-0.0, 4.0, -0.0, -0.0, -0.0,
470-
-0.0, -0.0, -0.0, 3.0, 4.0,
471-
-1.0, -0.0, -0.0, -0.0, -0.0,
468+
-0.0, -0.0, 0.0, 1.0, 2.0,
469+
-0.0, 4.0, 0.0, 0.0, -0.0,
470+
-0.0, +0.0, -0.0, 3.0, 4.0,
471+
-1.0, -0.0, -0.0, -0.0, +0.0,
472472
};
473473
// clang-format on
474474
std::vector<int64_t> shape = {4, 3};
@@ -973,10 +973,10 @@ class TestSparseCSRTensorCreationFromNegativeZero
973973
void FromTensor() {
974974
// clang-format off
975975
std::vector<ValueCType> data{
976-
-0.0, -0.0, -0.0,
976+
-0.0, -0.0, 0.0,
977977
-0.0, 4.0, -0.0,
978-
-0.0, -0.0, -0.0,
979-
-1.0, -0.0, -0.0,
978+
+0.0, -0.0, -0.0,
979+
-1.0, -0.0, +0.0,
980980
};
981981
// clang-format on
982982
std::vector<int64_t> shape = {4, 3};
@@ -1353,9 +1353,9 @@ class TestSparseCSCTensorCreationFromNegativeZero
13531353
void FromTensor() {
13541354
// clang-format off
13551355
std::vector<ValueCType> data{
1356-
-0.0, -0.0, -0.0,
1356+
-0.0, -0.0, +0.0,
13571357
-0.0, 4.0, -0.0,
1358-
-0.0, -0.0, -0.0,
1358+
-0.0, 0.0, -0.0,
13591359
-1.0, -0.0, -0.0,
13601360
};
13611361
// clang-format on
@@ -1673,9 +1673,9 @@ class TestSparseCSFTensorCreationFromNegativeZero
16731673
void FromTensor() {
16741674
// clang-format off
16751675
std::vector<ValueCType> data{
1676-
-0.0, -0.0, -0.0, -0.0,
1677-
4.0, -0.0, -0.0, -0.0,
1678-
-0.0, -1.0, -0.0, -0.0,
1676+
-0.0, -0.0, 0.0, -0.0,
1677+
4.0, +0.0, -0.0, -0.0,
1678+
0.0, -1.0, -0.0, -0.0,
16791679
};
16801680
// clang-format on
16811681
std::vector<int64_t> shape = {3, 4};

0 commit comments

Comments
 (0)