Add unit test for this. Fix build errors due to invalid pch settings in vc9 | release-noboost. git-svn-id: https://assimp.svn.sourceforge.net/svnroot/assimp/trunk@798 67173fc5-114c-0410-ac8e-9d2fd5bffc1f
19 lines
763 B
C++
19 lines
763 B
C++
|
|
#include "UnitTestPCH.h"
|
|
#include "utNoBoostTest.h"
|
|
|
|
|
|
CPPUNIT_TEST_SUITE_REGISTRATION (NoBoostTest);
|
|
|
|
// ------------------------------------------------------------------------------------------------
|
|
void NoBoostTest :: testFormat()
|
|
{
|
|
|
|
CPPUNIT_ASSERT( noboost::str( noboost::format("Ahoi!") ) == "Ahoi!" );
|
|
CPPUNIT_ASSERT( noboost::str( noboost::format("Ahoi! %%") ) == "Ahoi! %" );
|
|
CPPUNIT_ASSERT( noboost::str( noboost::format("Ahoi! %s") ) == "Ahoi! " );
|
|
CPPUNIT_ASSERT( noboost::str( noboost::format("Ahoi! %s") % "!!" ) == "Ahoi! !!" );
|
|
CPPUNIT_ASSERT( noboost::str( noboost::format("Ahoi! %s") % "!!" % "!!" ) == "Ahoi! !!" );
|
|
CPPUNIT_ASSERT( noboost::str( noboost::format("%s%s%s") % "a" % std::string("b") % "c" ) == "abc" );
|
|
}
|