Remove test-case for all-zero
Signed-off-by: Dave Rodgman <dave.rodgman@arm.com>
diff --git a/tests/suites/test_suite_bignum_core.function b/tests/suites/test_suite_bignum_core.function
index a832a51..6f810ff 100644
--- a/tests/suites/test_suite_bignum_core.function
+++ b/tests/suites/test_suite_bignum_core.function
@@ -319,27 +319,17 @@
}
mbedtls_mpi_uint x;
- size_t expected;
-
- // generate x with lz leading zeros and tz trailing zeros, all other bits set.
- if (lz == -1) {
- // special case: all zero
- x = 0;
- expected = sizeof(mbedtls_mpi_uint) * 8;
+ if ((lz + tz) > 0) {
+ // some zero bits
+ uint32_t s = (sizeof(mbedtls_mpi_uint) * 8 - lz - tz);
+ x = ((((mbedtls_mpi_uint) 1) << s) - 1) << tz;
} else {
- expected = lz;
- if ((lz + tz) > 0) {
- // some zero bits
- uint32_t s = (sizeof(mbedtls_mpi_uint) * 8 - lz - tz);
- x = ((((mbedtls_mpi_uint) 1) << s) - 1) << tz;
- } else {
- // all bits set
- x = ~((mbedtls_mpi_uint) 0);
- }
+ // all bits set
+ x = ~((mbedtls_mpi_uint) 0);
}
size_t n = mbedtls_mpi_core_clz(x);
- TEST_EQUAL(n, expected);
+ TEST_EQUAL(n, lz);
exit:
;
}
diff --git a/tests/suites/test_suite_bignum_core.misc.data b/tests/suites/test_suite_bignum_core.misc.data
index c245b02..ba86029 100644
--- a/tests/suites/test_suite_bignum_core.misc.data
+++ b/tests/suites/test_suite_bignum_core.misc.data
@@ -494,9 +494,6 @@
CLZ: 0 0: all ones
mpi_core_clz:0:0
-CLZ: -1 -1: all zeros
-mpi_core_clz:-1:-1
-
CLZ: 1 0
mpi_core_clz:1:0