Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(8)

Unified Diff: icu46/source/tools/ctestfw/unicode/testlog.h

Issue 5516007: Check in the pristine copy of ICU 4.6... (Closed) Base URL: svn://chrome-svn/chrome/trunk/deps/third_party/
Patch Set: Created 10 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « icu46/source/tools/ctestfw/unicode/testdata.h ('k') | icu46/source/tools/ctestfw/unicode/testtype.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: icu46/source/tools/ctestfw/unicode/testlog.h
===================================================================
--- icu46/source/tools/ctestfw/unicode/testlog.h (revision 0)
+++ icu46/source/tools/ctestfw/unicode/testlog.h (revision 0)
@@ -0,0 +1,46 @@
+/********************************************************************
+ * COPYRIGHT:
+ * Copyright (c) 2004-2010, International Business Machines Corporation and
+ * others. All Rights Reserved.
+ ********************************************************************/
+
+/* Created by grhoten 03/17/2004 */
+
+/* Base class for data driven tests */
+
+#ifndef U_TESTFW_TESTLOG
+#define U_TESTFW_TESTLOG
+
+#include "unicode/errorcode.h"
+#include "unicode/unistr.h"
+#include "unicode/testtype.h"
+
+/** Facilitates internal logging of data driven test service
+ * It would be interesting to develop this into a full
+ * fledged control system as in Java.
+ */
+class T_CTEST_EXPORT_API TestLog {
+public:
+ virtual ~TestLog();
+ virtual void errln( const UnicodeString &message ) = 0;
+ virtual void logln( const UnicodeString &message ) = 0;
+ virtual void dataerrln( const UnicodeString &message ) = 0;
+ virtual const char* getTestDataPath(UErrorCode& err) = 0;
+};
+
+class T_CTEST_EXPORT_API IcuTestErrorCode : public ErrorCode {
+public:
+ IcuTestErrorCode(TestLog &callingTestClass, const char *callingTestName) :
+ testClass(callingTestClass), testName(callingTestName) {}
+ virtual ~IcuTestErrorCode();
+ // Returns TRUE if isFailure().
+ UBool logIfFailureAndReset(const char *fmt, ...);
+ UBool logDataIfFailureAndReset(const char *fmt, ...);
+protected:
+ virtual void handleFailure() const;
+private:
+ TestLog &testClass;
+ const char *const testName;
+};
+
+#endif
Property changes on: icu46/source/tools/ctestfw/unicode/testlog.h
___________________________________________________________________
Added: svn:eol-style
+ LF
« no previous file with comments | « icu46/source/tools/ctestfw/unicode/testdata.h ('k') | icu46/source/tools/ctestfw/unicode/testtype.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698