From 78befdb9bedba3001bc03baebb1d07839c39bc71 Mon Sep 17 00:00:00 2001 From: mat007 Date: Sat, 29 Jan 2011 10:24:46 +0000 Subject: [PATCH] Added error analyser first draft git-svn-id: https://svn.code.sf.net/p/turtle/code/trunk@212 860be788-9bd5-4423-9f1e-828f051e677b --- build/build.xml | 4 ++++ .../mismatch_type_in_returns_action.cpp | 22 +++++++++++++++++++ 2 files changed, 26 insertions(+) create mode 100644 src/tests/errors_test/mismatch_type_in_returns_action.cpp diff --git a/build/build.xml b/build/build.xml index 297d967..cebbe64 100644 --- a/build/build.xml +++ b/build/build.xml @@ -17,6 +17,10 @@ + + + + diff --git a/src/tests/errors_test/mismatch_type_in_returns_action.cpp b/src/tests/errors_test/mismatch_type_in_returns_action.cpp new file mode 100644 index 0000000..36fc444 --- /dev/null +++ b/src/tests/errors_test/mismatch_type_in_returns_action.cpp @@ -0,0 +1,22 @@ +// +// Copyright Mathieu Champlon 2011 +// +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +#include + +namespace +{ + MOCK_CLASS( cl ) + { + MOCK_METHOD_EXT( m, 0, int(), m ) // add another test with void() and another with std::string() + }; + void test_case() + { + cl c; + MOCK_EXPECT( c, m ).returns( "42" ); + } +}