Skip to content

Instantly share code, notes, and snippets.

@TorstenRobitzki
Last active August 29, 2015 13:56
Show Gist options
  • Save TorstenRobitzki/9290124 to your computer and use it in GitHub Desktop.
Save TorstenRobitzki/9290124 to your computer and use it in GitHub Desktop.
#define BOOST_TEST_MAIN
#include <boost/test/unit_test.hpp>
#include <string>
BOOST_AUTO_TEST_CASE( test_concatenation_of_strings )
{
BOOST_CHECK_EQUAL( std::string( "abc" ) + std::string( "def" ), "abcdef" );
}
struct fixture
{
std::string a, b;
setup() : a( "abc" ), b( "def" )
{}
};
BOOST_FIXTURE_TEST_CASE( same_with_some_setup, fixture )
{
BOOST_CHECK_EQUAL( a + b, "abcdef" );
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment