tests/test_szmul.c

Wed, 26 Aug 2026 16:03:54 +0200

author
Mike Becker <universe@uap-core.de>
date
Wed, 26 Aug 2026 16:03:54 +0200
changeset 1710
d53be93acc10
parent 970
c9b02747cfc5
permissions
-rw-r--r--

fix that test.h is not standalone - fixes #927

970
c9b02747cfc5 move szmul to common.h
Mike Becker <universe@uap-core.de>
parents:
diff changeset
1 /*
c9b02747cfc5 move szmul to common.h
Mike Becker <universe@uap-core.de>
parents:
diff changeset
2 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
c9b02747cfc5 move szmul to common.h
Mike Becker <universe@uap-core.de>
parents:
diff changeset
3 *
c9b02747cfc5 move szmul to common.h
Mike Becker <universe@uap-core.de>
parents:
diff changeset
4 * Copyright 2023 Mike Becker, Olaf Wintermann All rights reserved.
c9b02747cfc5 move szmul to common.h
Mike Becker <universe@uap-core.de>
parents:
diff changeset
5 *
c9b02747cfc5 move szmul to common.h
Mike Becker <universe@uap-core.de>
parents:
diff changeset
6 * Redistribution and use in source and binary forms, with or without
c9b02747cfc5 move szmul to common.h
Mike Becker <universe@uap-core.de>
parents:
diff changeset
7 * modification, are permitted provided that the following conditions are met:
c9b02747cfc5 move szmul to common.h
Mike Becker <universe@uap-core.de>
parents:
diff changeset
8 *
c9b02747cfc5 move szmul to common.h
Mike Becker <universe@uap-core.de>
parents:
diff changeset
9 * 1. Redistributions of source code must retain the above copyright
c9b02747cfc5 move szmul to common.h
Mike Becker <universe@uap-core.de>
parents:
diff changeset
10 * notice, this list of conditions and the following disclaimer.
c9b02747cfc5 move szmul to common.h
Mike Becker <universe@uap-core.de>
parents:
diff changeset
11 *
c9b02747cfc5 move szmul to common.h
Mike Becker <universe@uap-core.de>
parents:
diff changeset
12 * 2. Redistributions in binary form must reproduce the above copyright
c9b02747cfc5 move szmul to common.h
Mike Becker <universe@uap-core.de>
parents:
diff changeset
13 * notice, this list of conditions and the following disclaimer in the
c9b02747cfc5 move szmul to common.h
Mike Becker <universe@uap-core.de>
parents:
diff changeset
14 * documentation and/or other materials provided with the distribution.
c9b02747cfc5 move szmul to common.h
Mike Becker <universe@uap-core.de>
parents:
diff changeset
15 *
c9b02747cfc5 move szmul to common.h
Mike Becker <universe@uap-core.de>
parents:
diff changeset
16 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
c9b02747cfc5 move szmul to common.h
Mike Becker <universe@uap-core.de>
parents:
diff changeset
17 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
c9b02747cfc5 move szmul to common.h
Mike Becker <universe@uap-core.de>
parents:
diff changeset
18 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
c9b02747cfc5 move szmul to common.h
Mike Becker <universe@uap-core.de>
parents:
diff changeset
19 * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
c9b02747cfc5 move szmul to common.h
Mike Becker <universe@uap-core.de>
parents:
diff changeset
20 * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
c9b02747cfc5 move szmul to common.h
Mike Becker <universe@uap-core.de>
parents:
diff changeset
21 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
c9b02747cfc5 move szmul to common.h
Mike Becker <universe@uap-core.de>
parents:
diff changeset
22 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
c9b02747cfc5 move szmul to common.h
Mike Becker <universe@uap-core.de>
parents:
diff changeset
23 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
c9b02747cfc5 move szmul to common.h
Mike Becker <universe@uap-core.de>
parents:
diff changeset
24 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
c9b02747cfc5 move szmul to common.h
Mike Becker <universe@uap-core.de>
parents:
diff changeset
25 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
c9b02747cfc5 move szmul to common.h
Mike Becker <universe@uap-core.de>
parents:
diff changeset
26 * POSSIBILITY OF SUCH DAMAGE.
c9b02747cfc5 move szmul to common.h
Mike Becker <universe@uap-core.de>
parents:
diff changeset
27 */
c9b02747cfc5 move szmul to common.h
Mike Becker <universe@uap-core.de>
parents:
diff changeset
28
c9b02747cfc5 move szmul to common.h
Mike Becker <universe@uap-core.de>
parents:
diff changeset
29 #include "cx/test.h"
1710
d53be93acc10 fix that test.h is not standalone - fixes #927
Mike Becker <universe@uap-core.de>
parents: 970
diff changeset
30 #include "cx/common.h"
d53be93acc10 fix that test.h is not standalone - fixes #927
Mike Becker <universe@uap-core.de>
parents: 970
diff changeset
31
d53be93acc10 fix that test.h is not standalone - fixes #927
Mike Becker <universe@uap-core.de>
parents: 970
diff changeset
32 #include <stdint.h>
970
c9b02747cfc5 move szmul to common.h
Mike Becker <universe@uap-core.de>
parents:
diff changeset
33
c9b02747cfc5 move szmul to common.h
Mike Becker <universe@uap-core.de>
parents:
diff changeset
34 CX_TEST(test_szmul) {
c9b02747cfc5 move szmul to common.h
Mike Becker <universe@uap-core.de>
parents:
diff changeset
35 size_t r;
c9b02747cfc5 move szmul to common.h
Mike Becker <universe@uap-core.de>
parents:
diff changeset
36 int e;
c9b02747cfc5 move szmul to common.h
Mike Becker <universe@uap-core.de>
parents:
diff changeset
37
c9b02747cfc5 move szmul to common.h
Mike Becker <universe@uap-core.de>
parents:
diff changeset
38 CX_TEST_DO {
c9b02747cfc5 move szmul to common.h
Mike Becker <universe@uap-core.de>
parents:
diff changeset
39 e = cx_szmul(5, 7, &r);
c9b02747cfc5 move szmul to common.h
Mike Becker <universe@uap-core.de>
parents:
diff changeset
40 CX_TEST_ASSERT(e == 0);
c9b02747cfc5 move szmul to common.h
Mike Becker <universe@uap-core.de>
parents:
diff changeset
41 CX_TEST_ASSERT(r == 35);
c9b02747cfc5 move szmul to common.h
Mike Becker <universe@uap-core.de>
parents:
diff changeset
42
c9b02747cfc5 move szmul to common.h
Mike Becker <universe@uap-core.de>
parents:
diff changeset
43 size_t s = SIZE_MAX & ~3;
c9b02747cfc5 move szmul to common.h
Mike Becker <universe@uap-core.de>
parents:
diff changeset
44
c9b02747cfc5 move szmul to common.h
Mike Becker <universe@uap-core.de>
parents:
diff changeset
45 e = cx_szmul(s / 4, 2, &r);
c9b02747cfc5 move szmul to common.h
Mike Becker <universe@uap-core.de>
parents:
diff changeset
46 CX_TEST_ASSERT(e == 0);
c9b02747cfc5 move szmul to common.h
Mike Becker <universe@uap-core.de>
parents:
diff changeset
47 CX_TEST_ASSERT(r == s / 2);
c9b02747cfc5 move szmul to common.h
Mike Becker <universe@uap-core.de>
parents:
diff changeset
48
c9b02747cfc5 move szmul to common.h
Mike Becker <universe@uap-core.de>
parents:
diff changeset
49 e = cx_szmul(2, s / 4, &r);
c9b02747cfc5 move szmul to common.h
Mike Becker <universe@uap-core.de>
parents:
diff changeset
50 CX_TEST_ASSERT(e == 0);
c9b02747cfc5 move szmul to common.h
Mike Becker <universe@uap-core.de>
parents:
diff changeset
51 CX_TEST_ASSERT(r == s / 2);
c9b02747cfc5 move szmul to common.h
Mike Becker <universe@uap-core.de>
parents:
diff changeset
52
c9b02747cfc5 move szmul to common.h
Mike Becker <universe@uap-core.de>
parents:
diff changeset
53 e = cx_szmul(s / 4, 4, &r);
c9b02747cfc5 move szmul to common.h
Mike Becker <universe@uap-core.de>
parents:
diff changeset
54 CX_TEST_ASSERT(e == 0);
c9b02747cfc5 move szmul to common.h
Mike Becker <universe@uap-core.de>
parents:
diff changeset
55 CX_TEST_ASSERT(r == s);
c9b02747cfc5 move szmul to common.h
Mike Becker <universe@uap-core.de>
parents:
diff changeset
56
c9b02747cfc5 move szmul to common.h
Mike Becker <universe@uap-core.de>
parents:
diff changeset
57 e = cx_szmul(4, s / 4, &r);
c9b02747cfc5 move szmul to common.h
Mike Becker <universe@uap-core.de>
parents:
diff changeset
58 CX_TEST_ASSERT(e == 0);
c9b02747cfc5 move szmul to common.h
Mike Becker <universe@uap-core.de>
parents:
diff changeset
59 CX_TEST_ASSERT(r == s);
c9b02747cfc5 move szmul to common.h
Mike Becker <universe@uap-core.de>
parents:
diff changeset
60
c9b02747cfc5 move szmul to common.h
Mike Becker <universe@uap-core.de>
parents:
diff changeset
61 e = cx_szmul(s / 4, 5, &r);
c9b02747cfc5 move szmul to common.h
Mike Becker <universe@uap-core.de>
parents:
diff changeset
62 CX_TEST_ASSERT(e != 0);
c9b02747cfc5 move szmul to common.h
Mike Becker <universe@uap-core.de>
parents:
diff changeset
63
c9b02747cfc5 move szmul to common.h
Mike Becker <universe@uap-core.de>
parents:
diff changeset
64 e = cx_szmul(5, s / 4, &r);
c9b02747cfc5 move szmul to common.h
Mike Becker <universe@uap-core.de>
parents:
diff changeset
65 CX_TEST_ASSERT(e != 0);
c9b02747cfc5 move szmul to common.h
Mike Becker <universe@uap-core.de>
parents:
diff changeset
66
c9b02747cfc5 move szmul to common.h
Mike Becker <universe@uap-core.de>
parents:
diff changeset
67 e = cx_szmul(SIZE_MAX - 4, 0, &r);
c9b02747cfc5 move szmul to common.h
Mike Becker <universe@uap-core.de>
parents:
diff changeset
68 CX_TEST_ASSERT(e == 0);
c9b02747cfc5 move szmul to common.h
Mike Becker <universe@uap-core.de>
parents:
diff changeset
69 CX_TEST_ASSERT(r == 0);
c9b02747cfc5 move szmul to common.h
Mike Becker <universe@uap-core.de>
parents:
diff changeset
70
c9b02747cfc5 move szmul to common.h
Mike Becker <universe@uap-core.de>
parents:
diff changeset
71 e = cx_szmul(0, SIZE_MAX - 1, &r);
c9b02747cfc5 move szmul to common.h
Mike Becker <universe@uap-core.de>
parents:
diff changeset
72 CX_TEST_ASSERT(e == 0);
c9b02747cfc5 move szmul to common.h
Mike Becker <universe@uap-core.de>
parents:
diff changeset
73 CX_TEST_ASSERT(r == 0);
c9b02747cfc5 move szmul to common.h
Mike Becker <universe@uap-core.de>
parents:
diff changeset
74
c9b02747cfc5 move szmul to common.h
Mike Becker <universe@uap-core.de>
parents:
diff changeset
75 e = cx_szmul(SIZE_MAX, 0, &r);
c9b02747cfc5 move szmul to common.h
Mike Becker <universe@uap-core.de>
parents:
diff changeset
76 CX_TEST_ASSERT(e == 0);
c9b02747cfc5 move szmul to common.h
Mike Becker <universe@uap-core.de>
parents:
diff changeset
77 CX_TEST_ASSERT(r == 0);
c9b02747cfc5 move szmul to common.h
Mike Becker <universe@uap-core.de>
parents:
diff changeset
78
c9b02747cfc5 move szmul to common.h
Mike Becker <universe@uap-core.de>
parents:
diff changeset
79 e = cx_szmul(0, SIZE_MAX, &r);
c9b02747cfc5 move szmul to common.h
Mike Becker <universe@uap-core.de>
parents:
diff changeset
80 CX_TEST_ASSERT(e == 0);
c9b02747cfc5 move szmul to common.h
Mike Becker <universe@uap-core.de>
parents:
diff changeset
81 CX_TEST_ASSERT(r == 0);
c9b02747cfc5 move szmul to common.h
Mike Becker <universe@uap-core.de>
parents:
diff changeset
82
c9b02747cfc5 move szmul to common.h
Mike Becker <universe@uap-core.de>
parents:
diff changeset
83 e = cx_szmul(0, 0, &r);
c9b02747cfc5 move szmul to common.h
Mike Becker <universe@uap-core.de>
parents:
diff changeset
84 CX_TEST_ASSERT(e == 0);
c9b02747cfc5 move szmul to common.h
Mike Becker <universe@uap-core.de>
parents:
diff changeset
85 CX_TEST_ASSERT(r == 0);
c9b02747cfc5 move szmul to common.h
Mike Becker <universe@uap-core.de>
parents:
diff changeset
86 }
c9b02747cfc5 move szmul to common.h
Mike Becker <universe@uap-core.de>
parents:
diff changeset
87 }
c9b02747cfc5 move szmul to common.h
Mike Becker <universe@uap-core.de>
parents:
diff changeset
88
c9b02747cfc5 move szmul to common.h
Mike Becker <universe@uap-core.de>
parents:
diff changeset
89 #ifdef CX_SZMUL_BUILTIN
c9b02747cfc5 move szmul to common.h
Mike Becker <universe@uap-core.de>
parents:
diff changeset
90
c9b02747cfc5 move szmul to common.h
Mike Becker <universe@uap-core.de>
parents:
diff changeset
91 // also test the custom implementation
c9b02747cfc5 move szmul to common.h
Mike Becker <universe@uap-core.de>
parents:
diff changeset
92 #undef CX_SZMUL_BUILTIN
c9b02747cfc5 move szmul to common.h
Mike Becker <universe@uap-core.de>
parents:
diff changeset
93
c9b02747cfc5 move szmul to common.h
Mike Becker <universe@uap-core.de>
parents:
diff changeset
94 #include "../src/szmul.c"
c9b02747cfc5 move szmul to common.h
Mike Becker <universe@uap-core.de>
parents:
diff changeset
95
c9b02747cfc5 move szmul to common.h
Mike Becker <universe@uap-core.de>
parents:
diff changeset
96 #define CX_SZMUL_BUILTIN
c9b02747cfc5 move szmul to common.h
Mike Becker <universe@uap-core.de>
parents:
diff changeset
97
c9b02747cfc5 move szmul to common.h
Mike Becker <universe@uap-core.de>
parents:
diff changeset
98 CX_TEST(test_szmul_impl) {
c9b02747cfc5 move szmul to common.h
Mike Becker <universe@uap-core.de>
parents:
diff changeset
99 size_t r;
c9b02747cfc5 move szmul to common.h
Mike Becker <universe@uap-core.de>
parents:
diff changeset
100 int e;
c9b02747cfc5 move szmul to common.h
Mike Becker <universe@uap-core.de>
parents:
diff changeset
101
c9b02747cfc5 move szmul to common.h
Mike Becker <universe@uap-core.de>
parents:
diff changeset
102 CX_TEST_DO {
c9b02747cfc5 move szmul to common.h
Mike Becker <universe@uap-core.de>
parents:
diff changeset
103 e = cx_szmul_impl(5, 7, &r);
c9b02747cfc5 move szmul to common.h
Mike Becker <universe@uap-core.de>
parents:
diff changeset
104 CX_TEST_ASSERT(e == 0);
c9b02747cfc5 move szmul to common.h
Mike Becker <universe@uap-core.de>
parents:
diff changeset
105 CX_TEST_ASSERT(r == 35);
c9b02747cfc5 move szmul to common.h
Mike Becker <universe@uap-core.de>
parents:
diff changeset
106
c9b02747cfc5 move szmul to common.h
Mike Becker <universe@uap-core.de>
parents:
diff changeset
107 size_t s = SIZE_MAX & ~3;
c9b02747cfc5 move szmul to common.h
Mike Becker <universe@uap-core.de>
parents:
diff changeset
108
c9b02747cfc5 move szmul to common.h
Mike Becker <universe@uap-core.de>
parents:
diff changeset
109 e = cx_szmul_impl(s / 4, 2, &r);
c9b02747cfc5 move szmul to common.h
Mike Becker <universe@uap-core.de>
parents:
diff changeset
110 CX_TEST_ASSERT(e == 0);
c9b02747cfc5 move szmul to common.h
Mike Becker <universe@uap-core.de>
parents:
diff changeset
111 CX_TEST_ASSERT(r == s / 2);
c9b02747cfc5 move szmul to common.h
Mike Becker <universe@uap-core.de>
parents:
diff changeset
112
c9b02747cfc5 move szmul to common.h
Mike Becker <universe@uap-core.de>
parents:
diff changeset
113 e = cx_szmul_impl(2, s / 4, &r);
c9b02747cfc5 move szmul to common.h
Mike Becker <universe@uap-core.de>
parents:
diff changeset
114 CX_TEST_ASSERT(e == 0);
c9b02747cfc5 move szmul to common.h
Mike Becker <universe@uap-core.de>
parents:
diff changeset
115 CX_TEST_ASSERT(r == s / 2);
c9b02747cfc5 move szmul to common.h
Mike Becker <universe@uap-core.de>
parents:
diff changeset
116
c9b02747cfc5 move szmul to common.h
Mike Becker <universe@uap-core.de>
parents:
diff changeset
117 e = cx_szmul_impl(s / 4, 4, &r);
c9b02747cfc5 move szmul to common.h
Mike Becker <universe@uap-core.de>
parents:
diff changeset
118 CX_TEST_ASSERT(e == 0);
c9b02747cfc5 move szmul to common.h
Mike Becker <universe@uap-core.de>
parents:
diff changeset
119 CX_TEST_ASSERT(r == s);
c9b02747cfc5 move szmul to common.h
Mike Becker <universe@uap-core.de>
parents:
diff changeset
120
c9b02747cfc5 move szmul to common.h
Mike Becker <universe@uap-core.de>
parents:
diff changeset
121 e = cx_szmul_impl(4, s / 4, &r);
c9b02747cfc5 move szmul to common.h
Mike Becker <universe@uap-core.de>
parents:
diff changeset
122 CX_TEST_ASSERT(e == 0);
c9b02747cfc5 move szmul to common.h
Mike Becker <universe@uap-core.de>
parents:
diff changeset
123 CX_TEST_ASSERT(r == s);
c9b02747cfc5 move szmul to common.h
Mike Becker <universe@uap-core.de>
parents:
diff changeset
124
c9b02747cfc5 move szmul to common.h
Mike Becker <universe@uap-core.de>
parents:
diff changeset
125 e = cx_szmul_impl(s / 4, 5, &r);
c9b02747cfc5 move szmul to common.h
Mike Becker <universe@uap-core.de>
parents:
diff changeset
126 CX_TEST_ASSERT(e != 0);
c9b02747cfc5 move szmul to common.h
Mike Becker <universe@uap-core.de>
parents:
diff changeset
127
c9b02747cfc5 move szmul to common.h
Mike Becker <universe@uap-core.de>
parents:
diff changeset
128 e = cx_szmul_impl(5, s / 4, &r);
c9b02747cfc5 move szmul to common.h
Mike Becker <universe@uap-core.de>
parents:
diff changeset
129 CX_TEST_ASSERT(e != 0);
c9b02747cfc5 move szmul to common.h
Mike Becker <universe@uap-core.de>
parents:
diff changeset
130
c9b02747cfc5 move szmul to common.h
Mike Becker <universe@uap-core.de>
parents:
diff changeset
131 e = cx_szmul_impl(SIZE_MAX - 4, 0, &r);
c9b02747cfc5 move szmul to common.h
Mike Becker <universe@uap-core.de>
parents:
diff changeset
132 CX_TEST_ASSERT(e == 0);
c9b02747cfc5 move szmul to common.h
Mike Becker <universe@uap-core.de>
parents:
diff changeset
133 CX_TEST_ASSERT(r == 0);
c9b02747cfc5 move szmul to common.h
Mike Becker <universe@uap-core.de>
parents:
diff changeset
134
c9b02747cfc5 move szmul to common.h
Mike Becker <universe@uap-core.de>
parents:
diff changeset
135 e = cx_szmul_impl(0, SIZE_MAX - 1, &r);
c9b02747cfc5 move szmul to common.h
Mike Becker <universe@uap-core.de>
parents:
diff changeset
136 CX_TEST_ASSERT(e == 0);
c9b02747cfc5 move szmul to common.h
Mike Becker <universe@uap-core.de>
parents:
diff changeset
137 CX_TEST_ASSERT(r == 0);
c9b02747cfc5 move szmul to common.h
Mike Becker <universe@uap-core.de>
parents:
diff changeset
138
c9b02747cfc5 move szmul to common.h
Mike Becker <universe@uap-core.de>
parents:
diff changeset
139 e = cx_szmul_impl(SIZE_MAX, 0, &r);
c9b02747cfc5 move szmul to common.h
Mike Becker <universe@uap-core.de>
parents:
diff changeset
140 CX_TEST_ASSERT(e == 0);
c9b02747cfc5 move szmul to common.h
Mike Becker <universe@uap-core.de>
parents:
diff changeset
141 CX_TEST_ASSERT(r == 0);
c9b02747cfc5 move szmul to common.h
Mike Becker <universe@uap-core.de>
parents:
diff changeset
142
c9b02747cfc5 move szmul to common.h
Mike Becker <universe@uap-core.de>
parents:
diff changeset
143 e = cx_szmul_impl(0, SIZE_MAX, &r);
c9b02747cfc5 move szmul to common.h
Mike Becker <universe@uap-core.de>
parents:
diff changeset
144 CX_TEST_ASSERT(e == 0);
c9b02747cfc5 move szmul to common.h
Mike Becker <universe@uap-core.de>
parents:
diff changeset
145 CX_TEST_ASSERT(r == 0);
c9b02747cfc5 move szmul to common.h
Mike Becker <universe@uap-core.de>
parents:
diff changeset
146
c9b02747cfc5 move szmul to common.h
Mike Becker <universe@uap-core.de>
parents:
diff changeset
147 e = cx_szmul_impl(0, 0, &r);
c9b02747cfc5 move szmul to common.h
Mike Becker <universe@uap-core.de>
parents:
diff changeset
148 CX_TEST_ASSERT(e == 0);
c9b02747cfc5 move szmul to common.h
Mike Becker <universe@uap-core.de>
parents:
diff changeset
149 CX_TEST_ASSERT(r == 0);
c9b02747cfc5 move szmul to common.h
Mike Becker <universe@uap-core.de>
parents:
diff changeset
150 }
c9b02747cfc5 move szmul to common.h
Mike Becker <universe@uap-core.de>
parents:
diff changeset
151 }
c9b02747cfc5 move szmul to common.h
Mike Becker <universe@uap-core.de>
parents:
diff changeset
152
c9b02747cfc5 move szmul to common.h
Mike Becker <universe@uap-core.de>
parents:
diff changeset
153 #endif // CX_SZMUL_BUILTIN
c9b02747cfc5 move szmul to common.h
Mike Becker <universe@uap-core.de>
parents:
diff changeset
154
c9b02747cfc5 move szmul to common.h
Mike Becker <universe@uap-core.de>
parents:
diff changeset
155
c9b02747cfc5 move szmul to common.h
Mike Becker <universe@uap-core.de>
parents:
diff changeset
156 CxTestSuite *cx_test_suite_szmul(void) {
c9b02747cfc5 move szmul to common.h
Mike Becker <universe@uap-core.de>
parents:
diff changeset
157 CxTestSuite *suite = cx_test_suite_new("szmul");
c9b02747cfc5 move szmul to common.h
Mike Becker <universe@uap-core.de>
parents:
diff changeset
158
c9b02747cfc5 move szmul to common.h
Mike Becker <universe@uap-core.de>
parents:
diff changeset
159 cx_test_register(suite, test_szmul);
c9b02747cfc5 move szmul to common.h
Mike Becker <universe@uap-core.de>
parents:
diff changeset
160 #ifdef CX_SZMUL_BUILTIN
c9b02747cfc5 move szmul to common.h
Mike Becker <universe@uap-core.de>
parents:
diff changeset
161 cx_test_register(suite, test_szmul_impl);
c9b02747cfc5 move szmul to common.h
Mike Becker <universe@uap-core.de>
parents:
diff changeset
162 #endif
c9b02747cfc5 move szmul to common.h
Mike Becker <universe@uap-core.de>
parents:
diff changeset
163
c9b02747cfc5 move szmul to common.h
Mike Becker <universe@uap-core.de>
parents:
diff changeset
164 return suite;
c9b02747cfc5 move szmul to common.h
Mike Becker <universe@uap-core.de>
parents:
diff changeset
165 }

mercurial