OSDN Git Service

rename CCUnitTestCase to CCUnitTestFunc
authortsutsumi <>
Fri, 20 Aug 2010 07:49:06 +0000 (07:49 +0000)
committertsutsumi <>
Fri, 20 Aug 2010 07:49:06 +0000 (07:49 +0000)
src/ccunit/CCUnitTestFailure.h
src/ccunit/CCUnitTestListener.h
src/ccunit/CCUnitTestRunner.c

index f5d96f2..2ca81dc 100644 (file)
@@ -1,5 +1,5 @@
 /* -*- C -*- */
-/* Copyright (C) 2003 TSUTSUMI Kikuo.
+/* Copyright (C) 2003, 2010 TSUTSUMI Kikuo.
    This file is part of the CCUnit Library.
 
    The CCUnit Library is free software; you can redistribute it and/or
@@ -29,7 +29,7 @@
 #define CCUNITTESTFAILURE_H
 
 #include <ccunit/CCUnitConfig.h>
-#include <ccunit/CCUnitTestCase.h>
+#include <ccunit/CCUnitTestFunc.h>
 
 /**
  * @ingroup ModuleHierarchy
@@ -52,7 +52,7 @@ typedef struct CCUnitTestFailure
   const char* condstr;                         /**< test condition */
   const char* expect;                          /**< expect value as string */
   const char* actual;                          /**< actual value as string */
-  const CCUnitTestCase* testCase;              /**< test case object */
+  const CCUnitTestFunc* testFunc;              /**< test function object */
 } CCUnitTestFailure;
 
 /**
index 3989be8..a590302 100644 (file)
@@ -1,5 +1,5 @@
 /* -*- mode: C; -*- */
-/* Copyright (C) 2003 TSUTSUMI Kikuo.
+/* Copyright (C) 2003, 2010 TSUTSUMI Kikuo.
    This file is part of the CCUnit Library.
 
    The CCUnit Library is free software; you can redistribute it and/or
@@ -30,7 +30,7 @@
 
 #include <ccunit/CCUnitConfig.h>
 #include <ccunit/CCUnitTestFailure.h>
-#include <ccunit/CCUnitTestFixture.h>
+#include <ccunit/CCUnitTestFunc.h>
 
 /**
  * @ingroup ModuleHierarchy
@@ -76,12 +76,12 @@ struct CCUnitTestListener
   /**
    * A test started.
    */
-  void (*startTest) (CCUnitTestListener* listener, CCUnitTestCase* testCase);
+  void (*startTest) (CCUnitTestListener* listener, CCUnitTestFunc* testFunc);
 
   /**
    * A test ended.
    */
-  void (*endTest) (CCUnitTestListener* listener, CCUnitTestCase* testCase);
+  void (*endTest) (CCUnitTestListener* listener, CCUnitTestFunc* testFunc);
 };
 
 /** @} */
index 793f1f8..c1eac7d 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (C) 2003 TSUTSUMI Kikuo.
+/* Copyright (C) 2003, 2010 TSUTSUMI Kikuo.
    This file is part of the CCUnit Library.
 
    The CCUnit Library is free software; you can redistribute it and/or
@@ -39,7 +39,7 @@
  * @param listener notification listener.
  * @param test starting test case
  */
-static void startTest (CCUnitTestListener* listener, CCUnitTestCase* test)
+static void startTest (CCUnitTestListener* listener, CCUnitTestFunc* test)
 {
   CCUnitTestRunner* runner = (CCUnitTestRunner*)listener;
   fputc ('.', runner->ofp);
@@ -50,7 +50,7 @@ static void startTest (CCUnitTestListener* listener, CCUnitTestCase* test)
  * @param listener notification listener.
  * @param test ended test case
  */
-static void endTest (CCUnitTestListener* listener, CCUnitTestCase* test)
+static void endTest (CCUnitTestListener* listener, CCUnitTestFunc* test)
 {
 }
 
@@ -118,7 +118,7 @@ static void printFailures (CCUnitTestRunner* runner, CCUnitTestResult* result)
     {
       fprintf (runner->ofp, "%s:%u: %s:\n\t%s\n",
               f->file, f->line,
-              f->testCase != NULL ? f->testCase->desc : "",
+              f->testFunc != NULL ? f->testFunc->desc : "",
               f->condstr);
       if (f->expect || f->actual)
        fprintf (runner->ofp, "\texpect: %s\n\tactual: %s\n", f->expect, f->actual);