mirror of
https://github.com/catchorg/Catch2.git
synced 2024-12-23 19:53:28 +01:00
994e64c217
- also fixed a typo in a test name
43 lines
937 B
C++
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() );
|
|
}
|
|
}
|
|
|
|
}
|
|
}
|