diff options
| author | Martin Hořeňovský | 2020-02-25 12:39:40 +0100 |
|---|---|---|
| committer | Martin Hořeňovský | 2020-02-26 16:07:54 +0100 |
| commit | d1ffaf55a1653575a5a24da738ee777cdb85626f (patch) | |
| tree | aa3988bec4f004e6c0d4d8fb11cde388e9515584 /examples/300-Gen-OwnGenerator.cpp | |
| parent | 33b47f7309653329fdd160867acd1830d9959ab2 (diff) | |
| download | catch3-d1ffaf55a1653575a5a24da738ee777cdb85626f.tar.gz | |
Fix warnings in ExtraTests and Examples
Diffstat (limited to 'examples/300-Gen-OwnGenerator.cpp')
| -rw-r--r-- | examples/300-Gen-OwnGenerator.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/examples/300-Gen-OwnGenerator.cpp b/examples/300-Gen-OwnGenerator.cpp index 0cb80c2f..ec98a048 100644 --- a/examples/300-Gen-OwnGenerator.cpp +++ b/examples/300-Gen-OwnGenerator.cpp @@ -10,6 +10,8 @@ #include <random> +namespace { + // This class shows how to implement a simple generator for Catch tests class RandomIntGenerator : public Catch::Generators::IGenerator<int> { std::minstd_rand m_rand; @@ -45,6 +47,8 @@ Catch::Generators::GeneratorWrapper<int> random(int low, int high) { ); } +} // end anonymous namespaces + // The two sections in this test case are equivalent, but the first one // is much more readable/nicer to use TEST_CASE("Generating random ints", "[example][generator]") { |