tests/test_utils.c

changeset 962
cd418898af5c
parent 955
18741059da47
equal deleted inserted replaced
961:bc8b7c5f55fb 962:cd418898af5c
93 93
94 cxBufferDestroy(&source); 94 cxBufferDestroy(&source);
95 cxBufferDestroy(&target); 95 cxBufferDestroy(&target);
96 } 96 }
97 97
98 CX_TEST(test_forn) {
99 unsigned j;
100 j = 0;
101 CX_TEST_DO {
102 cx_for_n(i, 50) {
103 CX_TEST_ASSERT(i == j);
104 j++;
105 }
106 }
107 }
108
109 CX_TEST(test_szmul) { 98 CX_TEST(test_szmul) {
110 size_t r; 99 size_t r;
111 int e; 100 int e;
112 101
113 CX_TEST_DO { 102 CX_TEST_DO {
231 CxTestSuite *cx_test_suite_utils(void) { 220 CxTestSuite *cx_test_suite_utils(void) {
232 CxTestSuite *suite = cx_test_suite_new("utils"); 221 CxTestSuite *suite = cx_test_suite_new("utils");
233 222
234 cx_test_register(suite, test_stream_bncopy); 223 cx_test_register(suite, test_stream_bncopy);
235 cx_test_register(suite, test_stream_ncopy); 224 cx_test_register(suite, test_stream_ncopy);
236 cx_test_register(suite, test_forn);
237 cx_test_register(suite, test_szmul); 225 cx_test_register(suite, test_szmul);
238 #ifdef CX_SZMUL_BUILTIN 226 #ifdef CX_SZMUL_BUILTIN
239 cx_test_register(suite, test_szmul_impl); 227 cx_test_register(suite, test_szmul_impl);
240 #endif 228 #endif
241 229

mercurial