diff options
| author | Joe Burzinski | 2019-12-15 00:16:04 -0600 |
|---|---|---|
| committer | Martin Hořeňovský | 2020-02-13 16:19:50 +0100 |
| commit | 82baef62e2cc6766915e2278309e41cab514f53d (patch) | |
| tree | 8a8f74f8b1731f62c6d0da6073e7643beed27f34 /tests/SelfTest/IntrospectiveTests | |
| parent | 0fbf4f3e152e8fe9a41fa1a960ea3dac3cb76e59 (diff) | |
| download | catch3-82baef62e2cc6766915e2278309e41cab514f53d.tar.gz | |
Fix forwarding in SingleValueGenerator and generator creation
Fixes #1809
Diffstat (limited to 'tests/SelfTest/IntrospectiveTests')
| -rw-r--r-- | tests/SelfTest/IntrospectiveTests/GeneratorsImpl.tests.cpp | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/tests/SelfTest/IntrospectiveTests/GeneratorsImpl.tests.cpp b/tests/SelfTest/IntrospectiveTests/GeneratorsImpl.tests.cpp index 17bc58e6..df5e036e 100644 --- a/tests/SelfTest/IntrospectiveTests/GeneratorsImpl.tests.cpp +++ b/tests/SelfTest/IntrospectiveTests/GeneratorsImpl.tests.cpp @@ -315,6 +315,21 @@ TEST_CASE("GENERATE capture macros", "[generators][internals][approvals]") { REQUIRE(value == value2); } +TEST_CASE("#1809 - GENERATE_COPY and SingleValueGenerator does not compile", "[generators][compilation][approvals]") { + // Verify Issue #1809 fix, only needs to compile. + auto a = GENERATE_COPY(1, 2); + (void)a; + auto b = GENERATE_COPY(as<long>{}, 1, 2); + (void)b; + int i = 1; + int j = 2; + auto c = GENERATE_COPY(i, j); + (void)c; + auto d = GENERATE_COPY(as<long>{}, i, j); + (void)d; + SUCCEED(); +} + TEST_CASE("Multiple random generators in one test case output different values", "[generators][internals][approvals]") { SECTION("Integer") { auto random1 = Catch::Generators::random(0, 1000); |