Home
last modified time | relevance | path

Searched refs:check (Results 1 – 25 of 55) sorted by relevance

123

/picolibc-latest/newlib/libm/test/
Dstring.c38 #define check(thing) checkit(thing, __LINE__) macro
84 check(strcmp("", "") == 0); /* Trivial case. */ in test_string()
85 check(strcmp("a", "a") == 0); /* Identity. */ in test_string()
86 check(strcmp("abc", "abc") == 0); /* Multicharacter. */ in test_string()
87 check(strcmp("abc", "abcd") < 0); /* Length mismatches. */ in test_string()
88 check(strcmp("abcd", "abc") > 0); in test_string()
89 check(strcmp("abcd", "abce") < 0); /* Honest miscompares. */ in test_string()
90 check(strcmp("abce", "abcd") > 0); in test_string()
91 check(strcmp("a\103", "a") > 0); /* Tricky if char signed. */ in test_string()
92 check(strcmp("a\103", "a\003") > 0); in test_string()
[all …]
/picolibc-latest/test/
Dtest-strchr.c42 #define check(func, needle, expect) do { \ macro
56 check(func, needle, expect); \
57 check(func, needle | 0xff00, expect); \
58 check(func, needle | 0x0100, expect); \
59 check(func, needle | 0x8000, expect); \
63 check(func, needle, expect); \
64 check(func, needle | 0xffffff00, expect); \
65 check(func, needle | 0x00000100, expect); \
66 check(func, needle | 0x80000000, expect); \
Dtest-mktemp.c40 #define check(condition, message) do { \ macro
67 check(f != NULL, "fopen r"); in check_contents()
71 check((char) c == *s, "contents"); in check_contents()
75 check(c == EOF, "EOF"); in check_contents()
78 check(r == 0, "fclose r"); in check_contents()
97 check(s_ret == template, "mktemp"); in main()
101 check(f != NULL, "fopen w"); in main()
111 check(i_ret >= 0, "mkstemp"); in main()
115 check(f != NULL, "fopen w"); in main()
125 check(i_ret >= 0, "mkstemps"); in main()
[all …]
Dffs.c88 check(long long int x, int got, int expect, char *which) in check() function
105 ret += check(0, ffs(0), slow_ffs(0), "ffs"); in main()
106 ret += check(0, ffsl(0), slow_ffsl(0), "ffsl"); in main()
107 ret += check(0, ffsll(0), slow_ffsll(0), "ffsll"); in main()
115 ret += check(x, ffs(x), slow_ffs(x), "ffs"); in main()
116 ret += check(xl, ffsl(xl), slow_ffsl(xl), "ffsl"); in main()
117 ret += check(xll, ffsll(xll), slow_ffsll(xll), "ffsll"); in main()
127 ret += check(x, ffs(x), slow_ffs(x), "ffs"); in main()
128 ret += check(xl, ffsl(xl), slow_ffsl(xl), "ffsl"); in main()
129 ret += check(xll, ffsll(xll), slow_ffsll(xll), "ffsll"); in main()
Dtest-fopen.c43 #define check(condition, message) do { \ macro
64 check(f != NULL, "fopen r"); in check_contents()
68 check((char) c == *s, "contents"); in check_contents()
72 check(c == EOF, "EOF"); in check_contents()
75 check(r == 0, "fclose r"); in check_contents()
85 check(f != NULL, "fopen w"); in main()
92 check(f != NULL, "fopen a"); in main()
99 check(f != NULL, "fopen w 2"); in main()
Dtest-fgetc.c43 #define check(condition, message) do { \ macro
62 check(f != NULL, "Error opening file"); in main()
65 check(ferror(f) == 0, "Error occured before reading"); in main()
69 check(ch == EOF, "fgetc returns non EOF"); in main()
72check(ferror(f) != 0, "After reading from non readable stream, the error flag of straem f is not s… in main()
Dtest-put.c43 check(char *label, bool ok, int expect, int got) in check() function
70 ret += check("putc", a == 'X', 'X', a); in main()
73 ret += check("putchar", a == 'Y', 'Y', a); in main()
76 ret += check("fputc", a == 'Z', 'Z', a); in main()
79 ret += check ("puts", a >= 0, 0, a); in main()
82 ret += check ("fputs", a >= 0, 0, a); in main()
Dtest-memset.c86 check(char *label, void *buf, size_t size, size_t start, size_t end, int c) in check() function
146 error += check("memset", buf, MAX_BUF, start, end, c); in test()
150 error += check("bzero", buf, MAX_BUF, start, end, 0); in test()
155 error += check("__aeabi_memset", buf, MAX_BUF, start, end, c); in test()
159 error += check("__aeabi_memclr", buf, MAX_BUF, start, end, 0); in test()
166 error += check("__aeabi_memset4", buf, MAX_BUF, start, end, c); in test()
170 error += check("__aeabi_memclr4", buf, MAX_BUF, start, end, 0); in test()
177 error += check("__aeabi_memset8", buf, MAX_BUF, start, end, c); in test()
181 error += check("__aeabi_memclr8", buf, MAX_BUF, start, end, 0); in test()
Dtest-fread-fwrite.c45 #define check(condition, message) do { \ macro
146 check(f != NULL, "fopen w"); in main()
153 check(ret == per_op, "fwrite ordered"); in main()
162 check(ret == per_op, "fwrite random"); in main()
170 check(f != NULL, "fopen r"); in main()
174 check(ret == per_op, "fread ordered"); in main()
183 check(ret == per_op, "fread random"); in main()
202 check(f != NULL, "fopen w+"); in main()
207 check(ret == BUF_SIZE, "fwrite mixed setup"); in main()
222 check(ret == (size_t) write_len, "fwrite mixed"); in main()
[all …]
Dtest-funopen.c110 #define check(condition, message) do { \ macro
127 check(memcmp(test_buf, MESSAGE, strlen(MESSAGE)) == 0, "printf"); in main()
130 check(ret == strlen(MESSAGE), "fread size"); in main()
131 check(memcmp(buf, MESSAGE, strlen(MESSAGE)) == 0, "fread contents"); in main()
Dtest-long-long.c123 check(long long x) in check() function
185 ret |= check(x); in main()
189 ret |= check(x); in main()
Drounding-mode.c151 check(int mode, char *name, double value) in check() function
252 ret += check(FE_TONEAREST, "FE_TONEAREST", my_values[i]); in main()
255 ret += check(FE_UPWARD, "FE_UPWARD", my_values[i]); in main()
258 ret += check(FE_DOWNWARD, "FE_DOWNWARD", my_values[i]); in main()
261 ret += check(FE_TOWARDZERO, "FE_TOWARDZERO", my_values[i]); in main()
Dmath_errhandling.c344 volatile long double check = nextafterl(zero, one); in main() local
345 if (check + check == zero) { in main()
/picolibc-latest/newlib/libc/machine/i960/
Dstrcmp_ca.S119 cmpo g0,g2 # check alignment of src1
126 cmpo g3,g1 # check alignment of src2
142 scanbyte 0,SRC1 # check for null byte in src1 word
156 cmpo g3,g1 # check alignment of src2
180 scanbyte 0,SRC1 # check for null byte in src1 word
202 cmpobne.f g0,g3,.diff # check for equality
203 cmpo 0,g0 # check for null byte
240 scanbyte 0,LSW # check for null byte
Dstrncpy_ca.S116 cmpo g3,g1 # check alignment of src
123 cmpo g0,g4 # check alignment of dest
130 cmpi g2,4 # check for fewer than four bytes to move
134 scanbyte 0,g1 # check for null byte in src word
151 cmpo 0,g14 # check for null byte
172 cmpo 0,g14 # check for null byte
188 cmpi g2,4 # check for fewer than four bytes to move
210 cmpo 0,g5 # check for null byte
239 scanbyte 0,g1 # check for null byte
255 scanbyte 0,g1 # check for null byte
[all …]
Dstrncmp_ca.S120 cmpo g0,SRC1 # check alignment of src1
127 cmpo g3,g1 # check alignment of src2
146 scanbyte 0,g0 # check for null byte in src1 word
157 cmpo g3,g1 # check alignment of src2
183 scanbyte 0,g0 # check for null byte in src1 word
203 cmpobne.f LSW,g3,.diff # check for equality
204 cmpo 0,LSW # check for null byte
246 scanbyte 0,LSW # check for null byte
Dstrncat_ca.S128 scanbyte 0,MSW # check for null byte
144 cmpo g1,g3 # check alignment of source
151 cmpi g2,4 # check for fewer than four bytes to move
154 scanbyte 0,g1 # check for null byte in src word
171 cmpo 0,g14 # check for null byte
188 shlo 8,LSW,LSW # check next byte
198 cmpo g1,g3 # check alignment of src
238 cmpo 0,g5 # check for null byte
264 scanbyte 0,g1 # check for null byte
285 scanbyte 0,g1 # check for null byte
Dstrcpy_ca.S139 scanbyte 0,MSW # check for null byte
172 cmpo g0,g4 # check alignment of dest
178 cmpo g3,g1 # check alignment of src
190 scanbyte 0,LSW # check for null byte in src word
208 cmpo 0,g14 # check for null byte
232 cmpo 0,g14 # check for null byte
249 scanbyte 0,g2 # check for null byte
260 cmpo g3,g1 # check alignment of src
Dstrcspn.S86 bne.t Lscan_set # check next character of charset
87 addo 1,g3,g3 # check next character of string
Dstrpbrk.S91 bne.t Lscan_set_strpbrk # check next character of brkset
92 addo 1,g0,g0 # check next character of string
Dstrlen.S94 scanbyte 0,g4 # check for null byte
97 scanbyte 0,g7 # check for null byte
Dstrchr.S100 scanbyte g3,g5 # check for byte with char
103 scanbyte 0,g5 # check for null byte
Dmemccpy.S118 scanbyte g6, g7 # check for char
126 and g5,g4,g7 # check the byte against char
Dmemcpy_ca.S125 cmpo g3,g1 # check alignment of src
132 cmpo g0,g4 # check alignment of dest
179 cmpi g2,4 # check for fewer than four bytes to move
207 cmpo g0,g4 # check alignment of dest
234 cmpo MSW,g5 # check alignment of end of src
241 cmpo g1,g4 # check alignment of dest
304 cmpi g2,4 # check for fewer than four bytes to move
328 cmpo g1,g4 # check alignment of dest
Dstrrchr.S107 scanbyte 0,g5 # check for null byte
110 scanbyte g3,g5 # check for byte with char

123