summaryrefslogtreecommitdiff
path: root/test/lib/str.c
diff options
context:
space:
mode:
authorAndrew Goodbody <andrew.goodbody@linaro.org>2024-12-16 18:07:36 +0000
committerTom Rini <trini@konsulko.com>2024-12-31 10:58:30 -0600
commit43ca65b30555d9b8e2a31f71d8756aa8c0ffbcf5 (patch)
treee5b3888ea314aa4a44d0d4072bd3a59ebb52890b /test/lib/str.c
parent99145eec2dca317da6b48d0f8fdd602001f87e61 (diff)
test: lib: Use CONFIG_64BIT to detect 64 bit compile
Should use CONFIG_64BIT to detect a 64 bit compile and not CONFIG_PHYS_64BIT. This allows more platforms to run the full test code. Reviewed-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andrew Goodbody <andrew.goodbody@linaro.org>
Diffstat (limited to 'test/lib/str.c')
-rw-r--r--test/lib/str.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/test/lib/str.c b/test/lib/str.c
index e62045318c0..48351abc756 100644
--- a/test/lib/str.c
+++ b/test/lib/str.c
@@ -224,13 +224,13 @@ static int str_itoa(struct unit_test_state *uts)
ut_asserteq_str("4294967295", simple_itoa(0xffffffff));
/* Use #ifdef here to avoid a compiler warning on 32-bit machines */
-#ifdef CONFIG_PHYS_64BIT
+#ifdef CONFIG_64BIT
if (sizeof(ulong) == 8) {
ut_asserteq_str("9223372036854775807",
simple_itoa((1UL << 63) - 1));
ut_asserteq_str("18446744073709551615", simple_itoa(-1));
}
-#endif /* CONFIG_PHYS_64BIT */
+#endif /* CONFIG_64BIT */
return 0;
}
@@ -244,13 +244,13 @@ static int str_xtoa(struct unit_test_state *uts)
ut_asserteq_str("ffffffff", simple_xtoa(0xffffffff));
/* Use #ifdef here to avoid a compiler warning on 32-bit machines */
-#ifdef CONFIG_PHYS_64BIT
+#ifdef CONFIG_64BIT
if (sizeof(ulong) == 8) {
ut_asserteq_str("7fffffffffffffff",
simple_xtoa((1UL << 63) - 1));
ut_asserteq_str("ffffffffffffffff", simple_xtoa(-1));
}
-#endif /* CONFIG_PHYS_64BIT */
+#endif /* CONFIG_64BIT */
return 0;
}