From ec32ff4b5f8e78b591da5ee4b0667ae2b258bc65 Mon Sep 17 00:00:00 2001 From: sowle Date: Sun, 26 Feb 2023 21:43:29 +0100 Subject: [PATCH] minor improvements --- contrib/epee/include/misc_helpers.h | 1 + tests/functional_tests/crypto_torsion_elements.h | 14 +++++++------- 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/contrib/epee/include/misc_helpers.h b/contrib/epee/include/misc_helpers.h index fb990e8a..58ddc3cd 100644 --- a/contrib/epee/include/misc_helpers.h +++ b/contrib/epee/include/misc_helpers.h @@ -66,6 +66,7 @@ } #define CATCH_ENTRY(location, return_val) CATCH_ENTRY_CUSTOM(location, (void)0, return_val) #define CATCH_ENTRY2(return_val) CATCH_ENTRY_CUSTOM(LOCATION_SS, (void)0, return_val) +#define CATCH_ENTRY_CUSTOM2(custom_code, return_val) CATCH_ENTRY_CUSTOM(LOCATION_SS, custom_code, return_val) #define CATCH_ENTRY_L0(location, return_val) CATCH_ENTRY(location, return_val) #define CATCH_ENTRY_L1(location, return_val) CATCH_ENTRY(location, return_val) diff --git a/tests/functional_tests/crypto_torsion_elements.h b/tests/functional_tests/crypto_torsion_elements.h index 51093327..ca775716 100644 --- a/tests/functional_tests/crypto_torsion_elements.h +++ b/tests/functional_tests/crypto_torsion_elements.h @@ -34,13 +34,13 @@ namespace crypto }; canonical_torsion_elements_t canonical_torsion_elements[] = { - {"26e8958fc2b227b045c3f489f2ef98f0d5dfac05d3c63339b13802886d53fc05", false, 8, 4, 7}, - {"0000000000000000000000000000000000000000000000000000000000000000", false, 4, 2, 3}, - {"c7176a703d4dd84fba3c0b760d10670f2a2053fa2c39ccc64ec7fd7792ac037a", false, 8, 4, 7}, - {"ecffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff7f", false, 2, 1, 3}, - {"c7176a703d4dd84fba3c0b760d10670f2a2053fa2c39ccc64ec7fd7792ac03fa", true, 8, 4, 7}, - {"0000000000000000000000000000000000000000000000000000000000000080", true, 4, 2, 3}, - {"26e8958fc2b227b045c3f489f2ef98f0d5dfac05d3c63339b13802886d53fc85", true, 8, 4, 7} + {"26e8958fc2b227b045c3f489f2ef98f0d5dfac05d3c63339b13802886d53fc05", false, 8, 4, 2}, + {"0000000000000000000000000000000000000000000000000000000000000000", false, 4, 2, 6}, + {"c7176a703d4dd84fba3c0b760d10670f2a2053fa2c39ccc64ec7fd7792ac037a", false, 8, 4, 2}, + {"ecffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff7f", false, 2, 5, 3}, + {"c7176a703d4dd84fba3c0b760d10670f2a2053fa2c39ccc64ec7fd7792ac03fa", true, 8, 4, 2}, + {"0000000000000000000000000000000000000000000000000000000000000080", true, 4, 2, 6}, + {"26e8958fc2b227b045c3f489f2ef98f0d5dfac05d3c63339b13802886d53fc85", true, 8, 4, 2} }; // non-canonical elements (should not load at all thanks to the checks in ge_frombytes_vartime)