]> code.citadel.org Git - citadel.git/blobdiff - libcitadel/tests/stringbuf_test.c
removed StartLibCitadel()
[citadel.git] / libcitadel / tests / stringbuf_test.c
index 99fa2ee77918f1162d1de1a0a9f14690764a9dec..2ca5c254fc717b85d6a595f3d2d83bd2b7750706 100644 (file)
@@ -1,9 +1,8 @@
-
 /*
  *  CUnit - A Unit testing framework library for C.
  *  Copyright (C) 2001  Anil Kumar
  *  
- *  This library is free software; you can redistribute it and/or
+ *  This library is open source software; you can redistribute it and/or
  *  modify it under the terms of the GNU Library General Public
  *  License as published by the Free Software Foundation; either
  *  version 2 of the License, or (at your option) any later version.
  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  *  Library General Public License for more details.
- *
- *  You should have received a copy of the GNU Library General Public
- *  License along with this library; if not, write to the Free Software
- *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
  */
-#define SHOW_ME_VAPPEND_PRINTF
 
 #include <stdio.h>
 #include <stdlib.h>
@@ -25,6 +19,7 @@
 #include <stdarg.h>
 
 #include "stringbuf_test.h"
+#define SHOW_ME_VAPPEND_PRINTF
 #include "../lib/libcitadel.h"
 
 int Quiet = 0;
@@ -204,6 +199,7 @@ static void TestBufNumbers(void)
        CU_ASSERT(strlen(ch) == i);
        free(ch);
        FreeStrBuf(&Buf2);
+       FreeStrBuf(&Buf3);
 }
 
 static void TestStrBufPeek(void)
@@ -233,6 +229,7 @@ static void TestStrBufPeek(void)
 
        CU_ASSERT(StrBufPeek(Buf, NULL, 5, 'A') == 5);
        CU_ASSERT_STRING_EQUAL(ChrPtr(Buf), "0123AA6");
+       FreeStrBuf(&Buf);
 }
 
 static void TestBufStringManipulation(void)
@@ -585,7 +582,7 @@ Some samples from the original...
 
 
 
-static void AddStrBufSimlpeTests(void)
+static void AddStrBufSimpleTests(void)
 {
        CU_pSuite pGroup = NULL;
        CU_pTest pTest = NULL;
@@ -624,21 +621,21 @@ static void AddStrBufSimlpeTests(void)
 
 int main(int argc, char* argv[])
 {
+       ///int i;
        setvbuf(stdout, NULL, _IONBF, 0);
 
-       StartLibCitadel(8);
        CU_BOOL Run = CU_FALSE ;
 
        if (argc > 0)
                Quiet = 1; // todo: -q ;-)
-       
+//     for (i=0; i< 100000; i++) {
        CU_set_output_filename("TestAutomated");
        if (CU_initialize_registry()) {
                printf("\nInitialize of test Registry failed.");
-       }
+//     }
        
        Run = CU_TRUE ;
-       AddStrBufSimlpeTests();
+       AddStrBufSimpleTests();
        
        if (CU_TRUE == Run) {
                //CU_console_run_tests();
@@ -648,6 +645,6 @@ int main(int argc, char* argv[])
        }
        
        CU_cleanup_registry();
-
+       }
        return 0;
 }