+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;
+};