From 438feb30014b9c2955f5a59ef985724311e767f7 Mon Sep 17 00:00:00 2001 From: Chip Hogg Date: Sat, 19 Mar 2022 17:05:55 +0000 Subject: [PATCH] Remove offending unit test Apparently, the constexpr depth which clang and MSVC can handle is too shallow for me to write a unit test that works on all supported compilers. --- test/unit_test/runtime/magnitude_test.cpp | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/test/unit_test/runtime/magnitude_test.cpp b/test/unit_test/runtime/magnitude_test.cpp index 9958c715..9db7b696 100644 --- a/test/unit_test/runtime/magnitude_test.cpp +++ b/test/unit_test/runtime/magnitude_test.cpp @@ -156,16 +156,6 @@ TEST_CASE("make_ratio performs prime factorization correctly") as_magnitude(); } - SECTION("Can handle prime number which would exceed GCC iteration limit") - { - // GCC 10 has a constexpr loop iteration limit of 262144. A naive algorithm, which performs trial division on 2 and - // all odd numbers up to sqrt(N), will exceed this limit for the following prime. Thus, for this test to pass, we - // need to be using a more efficient algorithm. (We could increase the limit, but we don't want users to have to - // mess with compiler flags just to compile the code.) - constexpr std::intmax_t big_prime = 414'131; - as_magnitude(); - } - SECTION("Can bypass computing primes by providing known_first_factor") { // Sometimes, even wheel factorization isn't enough to handle the compilers' limits on constexpr steps and/or