stdcxx-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From se...@apache.org
Subject svn commit: r354156 - /incubator/stdcxx/trunk/tests/algorithms/25.find.end.cpp
Date Mon, 05 Dec 2005 20:19:50 GMT
Author: sebor
Date: Mon Dec  5 12:19:45 2005
New Revision: 354156

URL: http://svn.apache.org/viewcvs?rev=354156&view=rev
Log:
2005-12-05  Anton Pevtsov <antonp@moscow.vdiweb.com>

	* 25.find.end.cpp (do_test): Eliminated memory leaks.

2005-12-05  Martin Sebor  <sebor@roguewave.com>

	* 25.find.end.cpp (run_tests): Corrected a typo introduced in r352022.

Modified:
    incubator/stdcxx/trunk/tests/algorithms/25.find.end.cpp

Modified: incubator/stdcxx/trunk/tests/algorithms/25.find.end.cpp
URL: http://svn.apache.org/viewcvs/incubator/stdcxx/trunk/tests/algorithms/25.find.end.cpp?rev=354156&r1=354155&r2=354156&view=diff
==============================================================================
--- incubator/stdcxx/trunk/tests/algorithms/25.find.end.cpp (original)
+++ incubator/stdcxx/trunk/tests/algorithms/25.find.end.cpp Mon Dec  5 12:19:45 2005
@@ -128,8 +128,11 @@
                __LINE__, it1name, it2name, src, fseq,
                resoff, res.cur_ - first1.cur_);
 
-    if (!success)
+    if (!success) {
+        delete[] tsrc;
+        delete[] tfseq;
         return;
+    }
 
     if (res.cur_ != last1.cur_) {
         std::size_t j = 0;
@@ -145,8 +148,11 @@
                    __LINE__, it1name, it2name, src, fseq,
                    fseq[j], (res.cur_ + j)->val_, j);
 
-        if (!success)
+        if (!success) {
+            delete[] tsrc;
+            delete[] tfseq;
             return;
+        }
     }
 
     success =
@@ -157,6 +163,9 @@
                __LINE__, it1name, it2name, src, fseq,
                predicate ? predicate : "comparison operator", 
                T::n_total_op_eq_, nfseq * (nsrc - nfseq + 1));
+
+    delete[] tsrc;
+    delete[] tfseq;
 }
 
 /**************************************************************************/
@@ -196,7 +205,7 @@
     TEST ("ababcdefghij",  "ab",  2);
     TEST ("abcbcdefghij",  "bc",  3);
     TEST ("abcdcdefghij",  "cd",  4);
-    TEST ("abcdedefghij",  "dE",  5);
+    TEST ("abcdedefghij",  "de",  5);
     TEST ("abcdefefghij",  "ef",  6);
     TEST ("abcdefgfghij",  "fg",  7);
     TEST ("abcdefghghij",  "gh",  8);



Mime
View raw message