From 60965d5f4d608bdccc2ffd4e8753e12cbbbd71d2 Mon Sep 17 00:00:00 2001 From: Jay Berkenbilt Date: Sun, 21 May 2023 13:35:09 -0400 Subject: Rerun clang-format --- libtests/qintc.cc | 20 ++++++-------------- 1 file changed, 6 insertions(+), 14 deletions(-) (limited to 'libtests/qintc.cc') diff --git a/libtests/qintc.cc b/libtests/qintc.cc index 52a1e91e..d360dd45 100644 --- a/libtests/qintc.cc +++ b/libtests/qintc.cc @@ -3,16 +3,11 @@ #include #include -#define try_convert(exp_pass, fn, i) \ - try_convert_real(#fn "(" #i ")", exp_pass, fn, i) +#define try_convert(exp_pass, fn, i) try_convert_real(#fn "(" #i ")", exp_pass, fn, i) template static void -try_convert_real( - char const* description, - bool exp_pass, - To (*fn)(From const&), - From const& i) +try_convert_real(char const* description, bool exp_pass, To (*fn)(From const&), From const& i) { bool passed = false; try { @@ -26,13 +21,11 @@ try_convert_real( std::cout << ((passed == exp_pass) ? " PASSED" : " FAILED") << std::endl; } -#define try_range_check(exp_pass, a, b) \ - try_range_check_real(#a " + " #b, exp_pass, a, b) +#define try_range_check(exp_pass, a, b) try_range_check_real(#a " + " #b, exp_pass, a, b) template static void -try_range_check_real( - char const* description, bool exp_pass, T const& a, T const& b) +try_range_check_real(char const* description, bool exp_pass, T const& a, T const& b) { bool passed = false; try { @@ -51,8 +44,7 @@ try_range_check_real( template static void -try_range_check_subtract_real( - char const* description, bool exp_pass, T const& a, T const& b) +try_range_check_subtract_real(char const* description, bool exp_pass, T const& a, T const& b) { bool passed = false; try { @@ -75,7 +67,7 @@ main() uint64_t ul2 = 12345; // Fits into 32-bit int32_t i2 = 81; // Fits in char and uchar auto c1 = static_cast('\xf7'); // Signed value when char - char c2 = 'W'; // char; may be signed or unsigned + char c2 = 'W'; // char; may be signed or unsigned // Verify i1 and u1 have same bit pattern assert(static_cast(i1) == u1); -- cgit v1.2.3-54-g00ecf