From da160cc36cb3819a1050264639d39d067ffaac6f Mon Sep 17 00:00:00 2001 From: Casey Carter Date: Thu, 11 Aug 2022 14:04:30 -0700 Subject: [PATCH 1/3] Split `tests/P1206R7_ranges_to` into four parts ,... to reduce resource consumption. The obvious approach here is to split the three big pieces (the `sequence_instantiator`, `mappish_instantiator`, and `settish_instantiator` tests) each into their own tests, leaving behind the three small pieces (`test_reservable`, `test_common_constructible`, and `test_nested_range`). Fun fact: there are now 50 `P1206R7` tests in the `std` suite. --- tests/std/test.lst | 5 +- tests/std/tests/P1206R7_ranges_to/test.cpp | 606 ------------------ .../env.lst | 0 .../tests/P1206R7_ranges_to_mappish/test.cpp | 190 ++++++ .../std/tests/P1206R7_ranges_to_misc/env.lst | 4 + .../std/tests/P1206R7_ranges_to_misc/test.cpp | 150 +++++ .../tests/P1206R7_ranges_to_sequence/env.lst | 4 + .../tests/P1206R7_ranges_to_sequence/test.cpp | 174 +++++ .../tests/P1206R7_ranges_to_settish/env.lst | 4 + .../tests/P1206R7_ranges_to_settish/test.cpp | 181 ++++++ 10 files changed, 711 insertions(+), 607 deletions(-) delete mode 100644 tests/std/tests/P1206R7_ranges_to/test.cpp rename tests/std/tests/{P1206R7_ranges_to => P1206R7_ranges_to_mappish}/env.lst (100%) create mode 100644 tests/std/tests/P1206R7_ranges_to_mappish/test.cpp create mode 100644 tests/std/tests/P1206R7_ranges_to_misc/env.lst create mode 100644 tests/std/tests/P1206R7_ranges_to_misc/test.cpp create mode 100644 tests/std/tests/P1206R7_ranges_to_sequence/env.lst create mode 100644 tests/std/tests/P1206R7_ranges_to_sequence/test.cpp create mode 100644 tests/std/tests/P1206R7_ranges_to_settish/env.lst create mode 100644 tests/std/tests/P1206R7_ranges_to_settish/test.cpp diff --git a/tests/std/test.lst b/tests/std/test.lst index 89a623e904..468dbba635 100644 --- a/tests/std/test.lst +++ b/tests/std/test.lst @@ -494,7 +494,10 @@ tests\P1206R7_priority_queue_from_range tests\P1206R7_priority_queue_push_range tests\P1206R7_queue_from_range tests\P1206R7_queue_push_range -tests\P1206R7_ranges_to +tests\P1206R7_ranges_to_mappish +tests\P1206R7_ranges_to_misc +tests\P1206R7_ranges_to_sequence +tests\P1206R7_ranges_to_settish tests\P1206R7_set_from_range tests\P1206R7_set_insert_range tests\P1206R7_stack_from_range diff --git a/tests/std/tests/P1206R7_ranges_to/test.cpp b/tests/std/tests/P1206R7_ranges_to/test.cpp deleted file mode 100644 index d6bf834fbc..0000000000 --- a/tests/std/tests/P1206R7_ranges_to/test.cpp +++ /dev/null @@ -1,606 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include - -using namespace std::literals; - -template -struct myalloc { - using value_type = T; - - int state = 42; - - myalloc() = default; - constexpr explicit myalloc(int i) noexcept : state{i} {} - template - constexpr myalloc(const myalloc& that) noexcept : state{that.state} {} - - [[nodiscard]] constexpr T* allocate(std::size_t n) const { - return std::allocator{}.allocate(n); - } - - constexpr void deallocate(T* const p, const std::size_t n) const noexcept { - std::allocator{}.deallocate(p, n); - } - - template - constexpr bool operator==(const myalloc& that) const noexcept { - return state == that.state; - } -}; - -struct sequence_instantiator { - template