OSSP CVS Repository

ossp - Check-in [2955]
Not logged in
[Honeypot]  [Browse]  [Home]  [Login]  [Reports
[Search]  [Ticket]  [Timeline
  [Patchset]  [Tagging/Branching

Check-in Number: 2955
Date: 2002-Dec-16 14:35:58 (local)
2002-Dec-16 13:35:58 (UTC)
User:mlelstv
Branch:
Comment: bail out of test if al_create fails (who said memory leak ?)
Tickets:
Inspections:
Files:
ossp-pkg/al/al_test.c      1.2 -> 1.3     8 inserted, 0 deleted

ossp-pkg/al/al_test.c 1.2 -> 1.3

--- al_test.c    2002/12/16 13:33:23     1.2
+++ al_test.c    2002/12/16 13:35:58     1.3
@@ -120,6 +120,7 @@
     EVAL0("al_create", {
         rc = al_create(&al);
     });
+    if (rc != AL_OK) return;
 
     EVAL1("al_append_bytes", al, {
         rc = al_append_bytes(al, S("Hello world\n"), NULL);
@@ -140,12 +141,15 @@
     EVAL0("al_create(&src)", {
         rc = al_create(&src);
     });
+    if (rc != AL_OK) return;
     EVAL0("al_create(&ins)", {
         rc = al_create(&ins);
     });
+    if (rc != AL_OK) return;
     EVAL0("al_create(&dst)", {
         rc = al_create(&dst);
     });
+    if (rc != AL_OK) return;
 
     for (i=0; i<500; ++i) {
         EVAL1("al_append_bytes(&src)", src, {
@@ -218,6 +222,8 @@
     EVAL0("al_create", {
         rc = al_create(&al);
     });
+    if (rc != AL_OK) return;
+
     EVAL0("al_append_bytes", {
         rc = al_append_bytes(al, S("Hello world. Goodbye world.\n"), LABEL);
     });
@@ -338,6 +344,8 @@
     EVAL0("al_create", {
         rc = al_create(&al);
     });
+    if (rc != AL_OK) return;
+
     EVAL1("al_append_bytes", al, {
         rc = al_append_bytes(al, S("Hello world\n"), NULL);
     });

CVSTrac 2.0.1