[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[lmi-commits] [lmi] master 168e9a70 03/10: Specify a constant more clear
From: |
Greg Chicares |
Subject: |
[lmi-commits] [lmi] master 168e9a70 03/10: Specify a constant more clearly |
Date: |
Mon, 20 Jun 2022 19:16:19 -0400 (EDT) |
branch: master
commit 168e9a7084bc668584d3b25250eaf08cd4fcdcee
Author: Gregory W. Chicares <gchicares@sbcglobal.net>
Commit: Gregory W. Chicares <gchicares@sbcglobal.net>
Specify a constant more clearly
Not everyone has memorized the decimal value of 2^63. With decimal
notation, a "ULL" suffix was required; hexadecimal notation never
requires any suffix.
---
math_functions_test.cpp | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/math_functions_test.cpp b/math_functions_test.cpp
index 268e4250..f9b78fa3 100644
--- a/math_functions_test.cpp
+++ b/math_functions_test.cpp
@@ -583,7 +583,7 @@ void test_signum(char const* file, int line)
void test_u_abs()
{
- LMI_TEST_EQUAL(9223372036854775808ULL, u_abs(INT64_MIN));
+ LMI_TEST_EQUAL(0x8000000000000000, u_abs(INT64_MIN));
constexpr auto int8_min {std::numeric_limits<std::int8_t>::min()};
constexpr auto int8_max {std::numeric_limits<std::int8_t>::max()};
- [lmi-commits] [lmi] master updated (876d4b5b -> 50009ece), Greg Chicares, 2022/06/20
- [lmi-commits] [lmi] master e986f0c9 02/10: Specify types more explicitly in unit test, Greg Chicares, 2022/06/20
- [lmi-commits] [lmi] master a6f2830d 01/10: Explain the necessity of a certain cast, Greg Chicares, 2022/06/20
- [lmi-commits] [lmi] master 3c9845b4 06/10: State the purpose of a particular unit test, Greg Chicares, 2022/06/20
- [lmi-commits] [lmi] master 8f5b6960 04/10: Demonstrate object sizes in unit test, Greg Chicares, 2022/06/20
- [lmi-commits] [lmi] master 1744d568 07/10: Regularize every mention of nextafter(), Greg Chicares, 2022/06/20
- [lmi-commits] [lmi] master e711587c 08/10: Expunge a workaround for an obsolete compiler, Greg Chicares, 2022/06/20
- [lmi-commits] [lmi] master 168e9a70 03/10: Specify a constant more clearly,
Greg Chicares <=
- [lmi-commits] [lmi] master 7258e4ae 05/10: Establish and test explicit postconditions, Greg Chicares, 2022/06/20
- [lmi-commits] [lmi] master 50009ece 10/10: x⋅(1+ε) ≢ nextafter(x) [264], Greg Chicares, 2022/06/20
- [lmi-commits] [lmi] master e7278f90 09/10: Add some functions to complement std::nextafter(), Greg Chicares, 2022/06/20