Commit b00b56061ab5eb8512569001745b7b4b2575b66b

Authored by Henry Schreiner
Committed by Henry Schreiner
1 parent 34c4310d

tests: fix minor errors to prepare for Catch2

tests/CreationTest.cpp
... ... @@ -167,7 +167,10 @@ TEST_F(TApp, MultipleSubcomNoMatchingInplaceUnderscore2) {
167 167 EXPECT_NO_THROW(second->ignore_underscore());
168 168 }
169 169  
170   -TEST_F(TApp, IncorrectConstructionFlagPositional1) { EXPECT_THROW(app.add_flag("cat"), CLI::IncorrectConstruction); }
  170 +TEST_F(TApp, IncorrectConstructionFlagPositional1) {
  171 + // This wants to be one line with clang-format
  172 + EXPECT_THROW(app.add_flag("cat"), CLI::IncorrectConstruction);
  173 +}
171 174  
172 175 TEST_F(TApp, IncorrectConstructionFlagPositional2) {
173 176 int x{0};
... ...
tests/app_helper.hpp
... ... @@ -12,7 +12,7 @@
12 12 #include "CLI/CLI.hpp"
13 13 #endif
14 14  
15   -#include "gtest/gtest.h"
  15 +#include "catch.hpp"
16 16 #include <iostream>
17 17 #include <string>
18 18 #include <utility>
... ... @@ -20,11 +20,11 @@
20 20  
21 21 using input_t = std::vector<std::string>;
22 22  
23   -class TApp_base {
  23 +class TApp {
24 24 public:
25 25 CLI::App app{"My Test Program"};
26 26 input_t args{};
27   - virtual ~TApp_base() = default;
  27 + virtual ~TApp() = default;
28 28 void run() {
29 29 // It is okay to re-parse - clear is called automatically before a parse.
30 30 input_t newargs = args;
... ... @@ -33,8 +33,6 @@ class TApp_base {
33 33 }
34 34 };
35 35  
36   -class TApp : public TApp_base, public ::testing::Test {};
37   -
38 36 class TempFile {
39 37 std::string _name{};
40 38  
... ...