Skip to content
Snippets Groups Projects
Commit 4f436ed8 authored by toole1's avatar toole1
Browse files

monad update\!

git-svn-id: https://subversion.cs.illinois.edu/svn/cs225@5068 6fbd10e7-183d-0410-a318-cb416676e4f2
parent b6eb3c59
No related branches found
No related tags found
No related merge requests found
monad identification file
This file is used for monad directory identification
Built by toole1 on linux3.ews.illinois.edu
Build Date: Sat Oct 15 04:03:27 CDT 2011
Built by toole1 on linux4.ews.illinois.edu
Build Date: Mon Oct 17 22:44:50 CDT 2011
......@@ -215,6 +215,27 @@ using std::endl;
#define ASSERT(expr) if (!(expr)) \
FAIL("Assertion (" #expr ") failed")
namespace proxy {
template <typename T>
inline std::string assert_equals_help(T expected, T actual, const char * expstr, const char * actstr)
{
std::stringstream ss;
if (actual != expected)
{
ss << "[" << actstr << " => " << actual << "] != [" << expstr << " => " << expected << "]";
return ss.str();
}
return monad_shared::unit_test::pass_string;
}
}
#define ASSERT_EQUALS(expected, actual) \
do { \
string errormsg = proxy::assert_equals_help(expected, actual, #expected, #actual); \
if (errormsg != monad_shared::unit_test::pass_string) \
FAIL(errormsg); \
} while (0)
#define ASSERT_OUTPUT(checkFunc, str) \
*this_test.checkstream << #checkFunc << str;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment