]> git.saurik.com Git - apple/icu.git/blobdiff - icuSources/test/intltest/pptest.cpp
ICU-8.11.tar.gz
[apple/icu.git] / icuSources / test / intltest / pptest.cpp
index 61ec4e78d4d04feda0a8327a9cbbf70f6a37fd31..2159183b17ac4beb1fa4df424c62064e48493f96 100644 (file)
@@ -1,6 +1,6 @@
 /********************************************************************
  * COPYRIGHT: 
- * Copyright (c) 1997-2003, International Business Machines Corporation and
+ * Copyright (c) 1997-2005, International Business Machines Corporation and
  * others. All Rights Reserved.
  ********************************************************************/
 
@@ -173,7 +173,10 @@ void ParsePositionTest::TestFieldPosition_example()
 
     UErrorCode status = U_ZERO_ERROR;
     NumberFormat *nf = NumberFormat::createInstance(status);
-    failure(status, "NumberFormat::createInstance");
+    if (failure(status, "NumberFormat::createInstance")){
+        delete nf;
+        return;
+    };
 
     if(nf->getDynamicClassID() != DecimalFormat::getStaticClassID()) {
         errln("NumberFormat::createInstance returned unexpected class type");