From 851511ae00f833ab35ecb8dd032b9bdbf0bba143 Mon Sep 17 00:00:00 2001 From: Alphagocc Date: Sat, 21 Dec 2024 16:56:30 +0800 Subject: [PATCH] fix tests on aarch64 --- tests/value/test_value_string.cc | 4 ++-- tests/value/test_value_typeordering.cc | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/tests/value/test_value_string.cc b/tests/value/test_value_string.cc index 2a0b8e409..3097ae57f 100644 --- a/tests/value/test_value_string.cc +++ b/tests/value/test_value_string.cc @@ -190,8 +190,8 @@ CASE("Ensure a well defined ordering of strings with other Values()") { EXPECT(val1.compare(val2) == 0); EXPECT(val2.compare(val1) == 0); - EXPECT(val1.compare(val3) == -1); - EXPECT(val3.compare(val1) == 1); + EXPECT(val1.compare(val3) < 0); + EXPECT(val3.compare(val1) > 0); // Check comparisons with other types of data (see test_value_typeordering). diff --git a/tests/value/test_value_typeordering.cc b/tests/value/test_value_typeordering.cc index 2077d565e..5f29bf99e 100644 --- a/tests/value/test_value_typeordering.cc +++ b/tests/value/test_value_typeordering.cc @@ -73,11 +73,11 @@ CASE("Every type compares correctly against every other type") { EXPECT(values[i] < values[j]); EXPECT(!(values[i] >= values[j])); - EXPECT(values[i].compare(values[j]) == -1); + EXPECT(values[i].compare(values[j]) < 0); EXPECT(values[j] >= values[i]); EXPECT(!(values[j] < values[i])); - EXPECT(values[j].compare(values[i]) == 1); + EXPECT(values[j].compare(values[i]) > 0); sanity_check++; } @@ -123,11 +123,11 @@ CASE("Every type compares correctly against every other type") { EXPECT(values[i] > values[j]); EXPECT(!(values[i] <= values[j])); - EXPECT(values[i].compare(values[j]) == 1); + EXPECT(values[i].compare(values[j]) > 0); EXPECT(values[j] <= values[i]); EXPECT(!(values[j] > values[i])); - EXPECT(values[j].compare(values[i]) == -1); + EXPECT(values[j].compare(values[i]) < 0); sanity_check++; }