summaryrefslogtreecommitdiff
path: root/test/printf.c
diff options
context:
space:
mode:
Diffstat (limited to 'test/printf.c')
-rw-r--r--test/printf.c19
1 files changed, 6 insertions, 13 deletions
diff --git a/test/printf.c b/test/printf.c
index 8ad84f46c4..90d146b45d 100644
--- a/test/printf.c
+++ b/test/printf.c
@@ -286,7 +286,6 @@ test_static int test_vsnprintf_long(void)
test_static int test_vsnprintf_pointers(void)
{
void *ptr = (void *)0x55005E00;
- unsigned int val = 0;
T(expect_success("55005e00", "%pP", ptr));
T(expect_success(err_str, "%P", ptr));
@@ -297,18 +296,12 @@ test_static int test_vsnprintf_pointers(void)
/* %p with an unknown suffix is invalid */
T(expect(EC_ERROR_INVAL, "", false, sizeof(output), "%pQ"));
- /* Test %pb, binary format */
- T(expect_success("0", "%pb", BINARY_VALUE(val, 0)));
- val = 0x5E;
- T(expect_success("1011110", "%pb", BINARY_VALUE(val, 0)));
- T(expect_success("0000000001011110", "%pb", BINARY_VALUE(val, 16)));
- val = 0x12345678;
- T(expect_success("10010001101000101011001111000", "%pb",
- BINARY_VALUE(val, 0)));
- val = 0xFEDCBA90;
- /* Test a number that makes the longest string possible */
- T(expect_success("11111110110111001011101010010000", "%pb",
- BINARY_VALUE(val, 0)));
+ /*
+ * Test %pb, which used to print binary, but is non-standard and no
+ * longer supported.
+ */
+ T(expect(EC_ERROR_INVAL, "", false, sizeof(output), "%pb", 0xff));
+
return EC_SUCCESS;
}