mirror of
https://github.com/mat007/turtle.git
synced 2026-06-22 12:13:43 +00:00
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:
parent
b61191a718
commit
e59dbf9e56
2 changed files with 28 additions and 5 deletions
|
|
@ -18,7 +18,30 @@
|
||||||
</target>
|
</target>
|
||||||
|
|
||||||
<target name="analyser" description="run errors analyser">
|
<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>
|
||||||
|
|
||||||
<target name="bench" description="build compilation benchmark">
|
<target name="bench" description="build compilation benchmark">
|
||||||
|
|
|
||||||
|
|
@ -10,13 +10,13 @@
|
||||||
|
|
||||||
namespace
|
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()
|
void test_case()
|
||||||
{
|
{
|
||||||
cl c;
|
mocked m;
|
||||||
MOCK_EXPECT( c, m ).returns( "42" );
|
MOCK_EXPECT( m, method ).returns( "42" );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue