summaryrefslogtreecommitdiff
path: root/cppe/test/include/TestCommon.h
diff options
context:
space:
mode:
authorDwayne Boone <dwayne@zeroc.com>2005-03-22 15:37:07 +0000
committerDwayne Boone <dwayne@zeroc.com>2005-03-22 15:37:07 +0000
commitfbdaac7a3e51b93bb9628e6f03bfaa6be93fb2a6 (patch)
tree5a8dd9b64e25a36516d8278fb617396d56e37488 /cppe/test/include/TestCommon.h
parentAdded initial IceJE tree (diff)
downloadice-fbdaac7a3e51b93bb9628e6f03bfaa6be93fb2a6.tar.bz2
ice-fbdaac7a3e51b93bb9628e6f03bfaa6be93fb2a6.tar.xz
ice-fbdaac7a3e51b93bb9628e6f03bfaa6be93fb2a6.zip
Added initial Ice-E code
Diffstat (limited to 'cppe/test/include/TestCommon.h')
-rw-r--r--cppe/test/include/TestCommon.h26
1 files changed, 26 insertions, 0 deletions
diff --git a/cppe/test/include/TestCommon.h b/cppe/test/include/TestCommon.h
new file mode 100644
index 00000000000..9786b1dc121
--- /dev/null
+++ b/cppe/test/include/TestCommon.h
@@ -0,0 +1,26 @@
+// **********************************************************************
+//
+// Copyright (c) 2003-2005 ZeroC, Inc. All rights reserved.
+//
+// This copy of Ice is licensed to you under the terms described in the
+// ICE_LICENSE file included in this distribution.
+//
+// **********************************************************************
+
+#ifndef TEST_COMMON_H
+#define TEST_COMMON_H
+
+#include <IceUtil/Config.h>
+#include <cstdlib>
+
+void
+inline testFailed(const char* expr, const char* file, unsigned int line)
+{
+ std::cout << "failed!" << std::endl;
+ std::cout << file << ':' << line << ": assertion `" << expr << "' failed" << std::endl;
+ abort();
+}
+
+#define test(ex) ((ex) ? ((void)0) : testFailed(#ex, __FILE__, __LINE__))
+
+#endif