catch2/projects/XCode4/CatchSelfTest/CatchSelfTest/BDDTests.cpp
Phil Nash 994e64c217 Added xml and junit output
- also fixed a typo in a test name
2012-11-29 08:49:32 +00:00

43 lines
937 B
C++

/*
* Created by Phil on 29/11/2010.
* Copyright 2010 Two Blue Cubes Ltd. All rights reserved.
*
* Distributed under the Boost Software License, Version 1.0. (See accompanying
* file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
*/
#ifdef __clang__
#pragma clang diagnostic ignored "-Wpadded"
#endif
#include "catch.hpp"
#define STORY( a, b )
#define SCENARIO( storyName, desc ) TEST_CASE( desc, "" )
#define GIVEN( desc ) SECTION( desc, "" )
#define WHEN( desc ) SECTION( desc, "" )
#define THEN( desc ) SECTION( desc, "" )
inline bool itDoesThis(){ return true; }
STORY( storyName, "once upon a time" )
SCENARIO( storyName, "scenario name" )
{
GIVEN( "This stuff exists" )
{
// make stuff exist
WHEN( "I do this" )
{
// do this
THEN( "it should do this")
{
REQUIRE( itDoesThis() );
}
}
}
}