More work on error logging tests

git-svn-id: https://svn.code.sf.net/p/turtle/code/trunk@248 860be788-9bd5-4423-9f1e-828f051e677b
This commit is contained in:
mat007 2011-02-21 00:40:52 +00:00
parent b61191a718
commit e59dbf9e56
2 changed files with 28 additions and 5 deletions

View file

@ -18,7 +18,30 @@
</target>
<target name="analyser" description="run errors analyser">
<build-test name="errors" depends="boost"/>
<quiet>
<delete file="${reports.dir}/errors-${platform}.log"/>
<touch file="${reports.dir}/errors-${platform}.log"/>
</quiet>
<for param="file">
<fileset dir="${tests.dir}/errors_test" includes="*.cpp"/>
<sequential>
<ant target="-analyser">
<property name="analyser-file" value="@{file}"/>
</ant>
</sequential>
</for>
</target>
<target name="-analyser">
<record name="${reports.dir}/errors-${platform}.log" action="start" append="true"/>
<trycatch>
<try>
<build-test name="errors" excludes="**" depends="boost">
<fileset file="${analyser-file}"/>
</build-test>
</try>
</trycatch>
<record name="${reports.dir}/errors-${platform}.log" action="stop"/>
</target>
<target name="bench" description="build compilation benchmark">

View file

@ -10,13 +10,13 @@
namespace
{
MOCK_CLASS( cl )
MOCK_CLASS( mocked )
{
MOCK_METHOD_EXT( m, 0, int(), m ) // add another test with void() and another with std::string()
MOCK_METHOD_EXT( method, 0, int(), method ) // add another test with void() and another with std::string()
};
void test_case()
{
cl c;
MOCK_EXPECT( c, m ).returns( "42" );
mocked m;
MOCK_EXPECT( m, method ).returns( "42" );
}
}