forked from mirror/trompeloeil
				
			
			You cannot select more than 25 topics
			Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
		
		
		
		
		
			|  be24ddd848 Catch2 has a framework to report number of assertions and list
which testcases it has ran. This does not work with REQUIRE_CALL
in trompeloeil.
Given a test in catch2 like this
SCENARIO("Foo test")
{
    WHEN("foo called"){
        THEN("call barfunc"){
            REQUIRE_CALL(bar, barfunc(5, ANY(int))).RETURN(4);
            foo.foo(5, 6);
        }
    }
}
will be reported as this:
  ===============================================================================
  test cases: 1 | 1 passed
  assertions: - none -
If you run the test with the -s option to include  successful tests in ouput
you get the same output as above
With this fix REQUIRE_CALL is counted as asserts and are included in the
successful output like this:
  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  footest is a Catch v2.8.0 host application.
  Run with -? for options
  -------------------------------------------------------------------------------
  Scenario: Foo test
         When: foo called
         Then: call barfunc
  -------------------------------------------------------------------------------
  /scratch/onetechmain/qt/test/HwModules/gpio/FooTest.cpp:50
  ...............................................................................
  /scratch/onetechmain/qt/test/TestHelpers/trompeloeil/include/catch2/trompeloeil.hpp:52: PASSED:
    REQUIRE( trompeloeil_mock_calls_done_correctly != 0 )
  with expansion:
    "bar.barfunc(5, ANY(int))" != 0
  ===============================================================================
  All tests passed (1 assertion in 1 test case) | 6 years ago | |
|---|---|---|
| .. | ||
| trompeloeil.hpp | 6 years ago | |