Skip to content

Commit 92a413b

Browse files
Address @mordante's review comments
- Skip 100 cases for constant evaluation. - Cite the source of MS UCRT's constants.
1 parent cdc613d commit 92a413b

File tree

3 files changed

+3
-13
lines changed

3 files changed

+3
-13
lines changed

libcxx/test/std/algorithms/alg.sorting/alg.merge/inplace_merge.pass.cpp

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -97,13 +97,8 @@ TEST_CONSTEXPR_CXX26 void test(RandSrc& randomness) {
9797
test_one<Iter>(3, 3, randomness);
9898
test<Iter>(4, randomness);
9999
test<Iter>(50, randomness);
100-
#if defined(_LIBCPP_HARDENING_MODE)
101-
if (!TEST_IS_CONSTANT_EVALUATED) // avoid exceeding the constant evaluation step limit
102-
#endif
103-
{
104-
test<Iter>(100, randomness);
105-
}
106100
if (!TEST_IS_CONSTANT_EVALUATED) { // avoid exceeding the constant evaluation step limit
101+
test<Iter>(100, randomness);
107102
test<Iter>(1000, randomness);
108103
}
109104
}

libcxx/test/std/algorithms/alg.sorting/alg.merge/inplace_merge_comp.pass.cpp

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -114,13 +114,8 @@ TEST_CONSTEXPR_CXX26 void test(RandSrc& randomness) {
114114
test<Iter>(4, randomness);
115115
test<Iter>(20, randomness);
116116
test<Iter>(50, randomness);
117-
#if defined(_LIBCPP_HARDENING_MODE)
118-
if (!TEST_IS_CONSTANT_EVALUATED) // avoid exceeding the constant evaluation step limit
119-
#endif
120-
{
121-
test<Iter>(100, randomness);
122-
}
123117
if (!TEST_IS_CONSTANT_EVALUATED) { // avoid exceeding the constant evaluation step limit
118+
test<Iter>(100, randomness);
124119
test<Iter>(1000, randomness);
125120
}
126121
}

libcxx/test/support/constexpr_random.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -379,7 +379,7 @@ class uniform_int_distribution {
379379
#endif
380380
};
381381

382-
class simple_random_generator {
382+
class simple_random_generator { // A linear congruential generator, using the constants used by MS UCRT.
383383
private:
384384
std::uint32_t status_;
385385

0 commit comments

Comments
 (0)