Questions tagged [catch-unit-test]

Catch is a unit testing framework for C++

Catch2 is a unit testing framework for C++11 and later. Catch2 offers a BDD syntax, fixtures, Matchers and dynamic data-generation, and a simplified syntax using overloaded assertions. Catch2 is designed for simplicity – it is released as a single include file and allows the use of natural C++ expressions inside assertions.

Catch2 is hosted on GitHub, available at catch-lib.net, and is openly discussed in a Google group.

93 questions
0
votes
1 answer

Catch Lib issue - anonymous-namespace redefinition. how to solve

I'm using Catch Lib for unit testing Previously, I tested a headers individually, and had no issue with TEST_CASEs but after final including all of these into the project I faced with a lot of errors like…
amigo421
  • 2,429
  • 4
  • 26
  • 55
0
votes
1 answer

Good way to repeat a test, inserting an extra action?

I like the way Catch has nested hierarchies of tests, and it works through the combinations. It feels more natural than the setup/teardown of xUnit frameworks. I now have a set of tests. What I want to do, about halfway down is insert a load/save…
Darren Cook
  • 27,837
  • 13
  • 117
  • 217
-1
votes
1 answer

fatal error on std::transform c++

I'm trying to transform a vector of foo instances to a string but I'm having fatal error on std::transform. Say data has the following value: [0] [name] = John [size] = 3423 [1] [name] = Joseph [size] = 3413 Code: struct foo { …
sabanana
  • 43
  • 6
1 2 3 4 5 6
7