noboost: Add working implementation for boost.format to get proper Collada error messages. See https://sourceforge.net/projects/assimp/forums/forum/817654/topic/3820367.

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
This commit is contained in:
aramis_acg
2010-08-23 17:49:03 +00:00
parent 9623663671
commit 20cc623ecd
6 changed files with 1077 additions and 752 deletions

View File

@@ -0,0 +1,18 @@
#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" );
}