A C Unit Test Library for C language.
Révision | 0d643585350d4421e4d5201dbe2ddaf9a7a95f7c (tree) |
---|---|
l'heure | 2014-05-09 23:32:33 |
Auteur | tsntsumi <tsntsumi@user...> |
Commiter | tsntsumi |
deleted the ineffective keyword inline.
As for ineffective inline, LLVM 5.1 came to take out a Warning.
@@ -32,12 +32,12 @@ typedef struct complex_t | ||
32 | 32 | } complex_t; |
33 | 33 | |
34 | 34 | extern complex_t* complex_new (double real, double imaginary); |
35 | -extern inline void complex_delete (const complex_t* cp); | |
35 | +extern void complex_delete (const complex_t* cp); | |
36 | 36 | extern char* complex_to_string (const complex_t* cp); |
37 | 37 | extern complex_t* complex_add (complex_t* z, const complex_t* x, const complex_t* y); |
38 | 38 | extern complex_t* complex_sub (complex_t* z, const complex_t* x, const complex_t* y); |
39 | 39 | extern complex_t* complex_mul (complex_t* z, const complex_t* x, const complex_t* y); |
40 | 40 | extern complex_t* complex_div (complex_t* z, const complex_t* x, const complex_t* y); |
41 | -extern inline int complex_equals (const complex_t*x, const complex_t* y); | |
41 | +extern int complex_equals (const complex_t*x, const complex_t* y); | |
42 | 42 | |
43 | 43 | #endif /* COMPLEX_H */ |
@@ -53,7 +53,7 @@ typedef struct CCUnitList | ||
53 | 53 | * Create new list object. |
54 | 54 | * @return new list object. |
55 | 55 | */ |
56 | -extern inline CCUnitList* ccunit_newList (); | |
56 | +extern CCUnitList* ccunit_newList (); | |
57 | 57 | |
58 | 58 | /** |
59 | 59 | * Add element to list object. |
@@ -107,16 +107,15 @@ extern CCUnitListIterator* ccunit_newListIterator (const struct CCUnitList* list | ||
107 | 107 | * @param it Iterator to initialize. |
108 | 108 | * @return Initialized iterator. |
109 | 109 | */ |
110 | -extern inline | |
111 | -CCUnitListIterator* ccunit_initListIterator (const struct CCUnitList* list, | |
112 | - struct CCUnitListIterator* it); | |
110 | +extern CCUnitListIterator* ccunit_initListIterator (const struct CCUnitList* list, | |
111 | + struct CCUnitListIterator* it); | |
113 | 112 | |
114 | 113 | /** |
115 | 114 | * delete list iterator. |
116 | 115 | * |
117 | 116 | * @param it iterator to delete. |
118 | 117 | */ |
119 | -extern inline void ccunit_deleteListIterator (struct CCUnitListIterator* it); | |
118 | +extern void ccunit_deleteListIterator (struct CCUnitListIterator* it); | |
120 | 119 | |
121 | 120 | /** |
122 | 121 | * Get next element. |
@@ -52,7 +52,7 @@ extern bool _ccunit_verbose_message; | ||
52 | 52 | * @param fmt message format string. |
53 | 53 | * @param ... message arguments. |
54 | 54 | */ |
55 | -extern inline void ccunit_dbg (const char* fmt, ...) | |
55 | +extern void ccunit_dbg (const char* fmt, ...) | |
56 | 56 | __attribute__ ((format (printf, 1, 2))); |
57 | 57 | |
58 | 58 | /** |
@@ -60,7 +60,7 @@ extern inline void ccunit_dbg (const char* fmt, ...) | ||
60 | 60 | * @param fmt message format string. |
61 | 61 | * @param ... message arguments. |
62 | 62 | */ |
63 | -extern inline void ccunit_log (const char* fmt, ...) | |
63 | +extern void ccunit_log (const char* fmt, ...) | |
64 | 64 | __attribute__ ((format (printf, 1, 2))); |
65 | 65 | |
66 | 66 | /** |
@@ -68,7 +68,7 @@ extern inline void ccunit_log (const char* fmt, ...) | ||
68 | 68 | * @param fmt message format string. |
69 | 69 | * @param ... message arguments. |
70 | 70 | */ |
71 | -extern inline void ccunit_err (const char* fmt, ...) | |
71 | +extern void ccunit_err (const char* fmt, ...) | |
72 | 72 | __attribute__ ((format (printf, 1, 2))); |
73 | 73 | |
74 | 74 | /** |
@@ -76,7 +76,7 @@ extern inline void ccunit_err (const char* fmt, ...) | ||
76 | 76 | * @param fmt message format string. |
77 | 77 | * @param ... message arguments. |
78 | 78 | */ |
79 | -extern inline void ccunit_msg (const char* fmt, ...) | |
79 | +extern void ccunit_msg (const char* fmt, ...) | |
80 | 80 | __attribute__ ((format (printf, 1, 2))); |
81 | 81 | |
82 | 82 | /** @} */ |
@@ -134,7 +134,7 @@ extern _CCUnitTestSuiteDef* ccunit_newTestSuiteDef (const char* name); | ||
134 | 134 | * |
135 | 135 | * @param suite test suite def. |
136 | 136 | */ |
137 | -extern inline void ccunit_deleteTestSuiteDef (_CCUnitTestSuiteDef* suite); | |
137 | +extern void ccunit_deleteTestSuiteDef (_CCUnitTestSuiteDef* suite); | |
138 | 138 | |
139 | 139 | /** @} */ |
140 | 140 |
@@ -159,7 +159,7 @@ extern CCUnitTestCase* ccunit_newTestCase (const char* name); | ||
159 | 159 | * @param testCase deleting case. |
160 | 160 | * @ingroup WritingTestCase |
161 | 161 | */ |
162 | -extern inline void ccunit_deleteTestCase (CCUnitTestCase* testCase); | |
162 | +extern void ccunit_deleteTestCase (CCUnitTestCase* testCase); | |
163 | 163 | |
164 | 164 | /** |
165 | 165 | * add test function to test case. |
@@ -192,7 +192,7 @@ extern CCUnitTestFunc* ccunit_addNewTestFunc (CCUnitTestCase* testCase, | ||
192 | 192 | * @return test result. |
193 | 193 | * @ingroup ExecutingTest |
194 | 194 | */ |
195 | -extern inline struct CCUnitTestResult* ccunit_runTestCase (CCUnitTestCase* testCase); | |
195 | +extern struct CCUnitTestResult* ccunit_runTestCase (CCUnitTestCase* testCase); | |
196 | 196 | |
197 | 197 | /** @} */ |
198 | 198 | #endif |
@@ -99,13 +99,6 @@ extern CCUnitTestFunc* ccunit_newTestFunc (const char* name, | ||
99 | 99 | */ |
100 | 100 | extern void ccunit_deleteTestFunc (CCUnitTestFunc* f); |
101 | 101 | |
102 | -/** | |
103 | - * Delete test function. | |
104 | - * @param f deleting function. | |
105 | - * @ingroup WritingTestCase | |
106 | - */ | |
107 | -extern inline void ccunit_deleteTestFunc (CCUnitTestFunc* f); | |
108 | - | |
109 | 102 | /** @} */ |
110 | 103 | |
111 | 104 | #endif /* !CCUNITTESTFUNC_H */ |
@@ -91,7 +91,7 @@ extern void ccunit_addFailure (CCUnitTestResult* result, | ||
91 | 91 | * @param listener adding listener. |
92 | 92 | * @ingroup TrackingTestExecution |
93 | 93 | */ |
94 | -extern inline void ccunit_addResultListener (CCUnitTestResult* result, | |
94 | +extern void ccunit_addResultListener (CCUnitTestResult* result, | |
95 | 95 | CCUnitTestListener* listener); |
96 | 96 | |
97 | 97 | /** |
@@ -99,35 +99,35 @@ extern inline void ccunit_addResultListener (CCUnitTestResult* result, | ||
99 | 99 | * @param result result object. |
100 | 100 | * @ingroup TrackingTestExecution |
101 | 101 | */ |
102 | -extern inline CCUnitListIterator* ccunit_failures(CCUnitTestResult* result); | |
102 | +extern CCUnitListIterator* ccunit_failures(CCUnitTestResult* result); | |
103 | 103 | |
104 | 104 | /** |
105 | 105 | * Gets the number of detected failures. |
106 | 106 | * @param result result object. |
107 | 107 | * @ingroup TrackingTestExecution |
108 | 108 | */ |
109 | -extern inline size_t ccunit_failureCount (CCUnitTestResult* result); | |
109 | +extern size_t ccunit_failureCount (CCUnitTestResult* result); | |
110 | 110 | |
111 | 111 | /** |
112 | 112 | * Returns whether the entire test was successful or not. |
113 | 113 | * @param result result object. |
114 | 114 | * @ingroup TrackingTestExecution |
115 | 115 | */ |
116 | -extern inline bool ccunit_wasSuccessful (CCUnitTestResult* result); | |
116 | +extern bool ccunit_wasSuccessful (CCUnitTestResult* result); | |
117 | 117 | |
118 | 118 | /** |
119 | 119 | * Marks that the test run should stop. |
120 | 120 | * @param result result object. |
121 | 121 | * @ingroup TrackingTestExecution |
122 | 122 | */ |
123 | -extern inline void ccunit_stopTest (CCUnitTestResult* result); | |
123 | +extern void ccunit_stopTest (CCUnitTestResult* result); | |
124 | 124 | |
125 | 125 | /** |
126 | 126 | * Gets the number of run tests. |
127 | 127 | * @param result result object. |
128 | 128 | * @ingroup TrackingTestExecution |
129 | 129 | */ |
130 | -extern inline size_t ccunit_runCount (CCUnitTestResult* result); | |
130 | +extern size_t ccunit_runCount (CCUnitTestResult* result); | |
131 | 131 | |
132 | 132 | /** @} */ |
133 | 133 |
@@ -96,7 +96,7 @@ extern void ccunit_deleteTestRunner (CCUnitTestRunner* runner); | ||
96 | 96 | * @return 0 if succeeded, -1 if error occurred. |
97 | 97 | * @ingroup ExecutingTest |
98 | 98 | */ |
99 | -extern inline int ccunit_runTestRunner (CCUnitTestRunner* runner, | |
99 | +extern int ccunit_runTestRunner (CCUnitTestRunner* runner, | |
100 | 100 | CCUnitTestSuite* suite); |
101 | 101 | |
102 | 102 | /** |
@@ -105,7 +105,7 @@ extern inline int ccunit_runTestRunner (CCUnitTestRunner* runner, | ||
105 | 105 | * @param runner test runner. |
106 | 106 | * @return test result object. |
107 | 107 | */ |
108 | -extern inline CCUnitTestResult* ccunit_getResult (CCUnitTestRunner* runner); | |
108 | +extern CCUnitTestResult* ccunit_getResult (CCUnitTestRunner* runner); | |
109 | 109 | |
110 | 110 | /** @} */ |
111 | 111 |
@@ -75,7 +75,7 @@ typedef struct CCUnitTestSuiteDfn | ||
75 | 75 | * @return new test suite. |
76 | 76 | * @ingroup CreatingTestSuite |
77 | 77 | */ |
78 | -extern inline CCUnitTestSuite* ccunit_newTestSuite(const char* name); | |
78 | +extern CCUnitTestSuite* ccunit_newTestSuite(const char* name); | |
79 | 79 | |
80 | 80 | /** |
81 | 81 | * Constructs a TestSuite from definition struct. |
@@ -89,7 +89,7 @@ extern CCUnitTestSuite* ccunit_newTestSuiteFromDfn (const CCUnitTestSuiteDfn* sd | ||
89 | 89 | * @param suite deleting suite. |
90 | 90 | * @ingroup CreatingTestSuite |
91 | 91 | */ |
92 | -extern inline void ccunit_deleteTestSuite (CCUnitTestSuite* suite); | |
92 | +extern void ccunit_deleteTestSuite (CCUnitTestSuite* suite); | |
93 | 93 | |
94 | 94 | /** |
95 | 95 | * Adds a test to the suite. |
@@ -97,7 +97,7 @@ extern inline void ccunit_deleteTestSuite (CCUnitTestSuite* suite); | ||
97 | 97 | * @param test test to add. |
98 | 98 | * @ingroup CreatingTestSuite |
99 | 99 | */ |
100 | -extern inline void ccunit_addTest (CCUnitTestSuite* suite, CCUnitTest* test); | |
100 | +extern void ccunit_addTest (CCUnitTestSuite* suite, CCUnitTest* test); | |
101 | 101 | |
102 | 102 | /** |
103 | 103 | * Adds a test suite to the suite. |
@@ -105,7 +105,7 @@ extern inline void ccunit_addTest (CCUnitTestSuite* suite, CCUnitTest* test); | ||
105 | 105 | * @param testSuite test to add. |
106 | 106 | * @ingroup CreatingTestSuite |
107 | 107 | */ |
108 | -extern inline void ccunit_addTestSuite (CCUnitTestSuite* suite, | |
108 | +extern void ccunit_addTestSuite (CCUnitTestSuite* suite, | |
109 | 109 | CCUnitTestSuite* testSuite); |
110 | 110 | |
111 | 111 | /** |
@@ -114,7 +114,7 @@ extern inline void ccunit_addTestSuite (CCUnitTestSuite* suite, | ||
114 | 114 | * @param testCase test case to add. |
115 | 115 | * @ingroup CreatingTestSuite |
116 | 116 | */ |
117 | -extern inline void ccunit_addTestCase (CCUnitTestSuite* suite, | |
117 | +extern void ccunit_addTestCase (CCUnitTestSuite* suite, | |
118 | 118 | CCUnitTestCase* testCase); |
119 | 119 | |
120 | 120 | /** |
@@ -124,7 +124,7 @@ extern inline void ccunit_addTestCase (CCUnitTestSuite* suite, | ||
124 | 124 | * @return test result. |
125 | 125 | * @ingroup ExecutingTest |
126 | 126 | */ |
127 | -extern inline CCUnitTestResult* ccunit_runTestSuite (CCUnitTestSuite* suite, | |
127 | +extern CCUnitTestResult* ccunit_runTestSuite (CCUnitTestSuite* suite, | |
128 | 128 | CCUnitTestResult* result); |
129 | 129 | |
130 | 130 | /** |