From 726b66022d8ed446d4863411259a3ae24d703a93 Mon Sep 17 00:00:00 2001 From: mat tso Date: Tue, 8 Mar 2016 02:04:00 +0100 Subject: [PATCH] Refactor toString vector test Exectute allocator tests even for c++98. --- projects/SelfTest/ToStringContainers.cpp | 100 ++++++++++------------- 1 file changed, 42 insertions(+), 58 deletions(-) diff --git a/projects/SelfTest/ToStringContainers.cpp b/projects/SelfTest/ToStringContainers.cpp index c3a8d4ed..c0dbceaa 100644 --- a/projects/SelfTest/ToStringContainers.cpp +++ b/projects/SelfTest/ToStringContainers.cpp @@ -1,77 +1,61 @@ #include "catch.hpp" #include +#include +#include +/// \file Test Catch::to_string for standard containors. -// vedctor -TEST_CASE( "vector -> toString", "[toString][vector]" ) -{ - std::vector vv; - REQUIRE( Catch::toString(vv) == "{ }" ); - vv.push_back( 42 ); - REQUIRE( Catch::toString(vv) == "{ 42 }" ); - vv.push_back( 250 ); - REQUIRE( Catch::toString(vv) == "{ 42, 250 }" ); +/// \brief Test for sequence containors +/// \tparm Sequence The containor to test. +/// \tparm Allocator The containor element allocator to use. +template