[flang] Accept polymorphic component element in storage_size
[llvm-project.git] / libc / test / src / stdio / CMakeLists.txt
blobe94432d069f2e2d40b242e29a1b5218648ed8a78
1 add_libc_testsuite(libc_stdio_unittests)
3 add_libc_unittest(
4   fileop_test
5   SUITE
6     libc_stdio_unittests
7   SRCS
8     fileop_test.cpp
9   DEPENDS
10     libc.include.errno
11     libc.include.stdio
12     libc.src.stdio.clearerr
13     libc.src.stdio.fclose
14     libc.src.stdio.feof
15     libc.src.stdio.ferror
16     libc.src.stdio.fflush
17     libc.src.stdio.fopen
18     libc.src.stdio.fputs
19     libc.src.stdio.fread
20     libc.src.stdio.fseek
21     libc.src.stdio.fwrite
24 add_libc_unittest(
25   ungetc_test
26   SUITE
27     libc_stdio_unittests
28   SRCS
29     ungetc_test.cpp
30   DEPENDS
31     libc.include.stdio
32     libc.src.stdio.fclose
33     libc.src.stdio.fopen
34     libc.src.stdio.fread
35     libc.src.stdio.fseek
36     libc.src.stdio.fwrite
37     libc.src.stdio.ungetc
40 add_libc_unittest(
41   setbuf_test
42   SUITE
43     libc_stdio_unittests
44   SRCS
45     setbuf_test.cpp
46   DEPENDS
47     libc.include.stdio
48     libc.src.stdio.fclose
49     libc.src.stdio.fopen
50     libc.src.stdio.fread
51     libc.src.stdio.fwrite
52     libc.src.stdio.setbuf
53     libc.src.stdio.ungetc
56 add_libc_unittest(
57   setvbuf_test
58   SUITE
59     libc_stdio_unittests
60   SRCS
61     setvbuf_test.cpp
62   DEPENDS
63     libc.include.errno
64     libc.include.stdio
65     libc.src.stdio.fclose
66     libc.src.stdio.fopen
67     libc.src.stdio.fread
68     libc.src.stdio.fwrite
69     libc.src.stdio.setvbuf
72 add_libc_unittest(
73   unlocked_fileop_test
74   SUITE
75     libc_stdio_unittests
76   SRCS
77     unlocked_fileop_test.cpp
78   DEPENDS
79     libc.include.errno
80     libc.include.stdio
81     libc.src.stdio.clearerr_unlocked
82     libc.src.stdio.fclose
83     libc.src.stdio.feof_unlocked
84     libc.src.stdio.ferror_unlocked
85     libc.src.stdio.flockfile
86     libc.src.stdio.fopen
87     libc.src.stdio.fread_unlocked
88     libc.src.stdio.funlockfile
89     libc.src.stdio.fwrite_unlocked
92 add_libc_unittest(
93   fopencookie_test
94   SUITE
95     libc_stdio_unittests
96   SRCS
97     fopencookie_test.cpp
98   DEPENDS
99     libc.include.errno
100     libc.include.stdio
101     libc.include.stdlib
102     libc.src.stdio.clearerr
103     libc.src.stdio.fclose
104     libc.src.stdio.feof
105     libc.src.stdio.ferror
106     libc.src.stdio.fflush
107     libc.src.stdio.fopencookie
108     libc.src.stdio.fread
109     libc.src.stdio.fseek
110     libc.src.stdio.fwrite
111   LINK_LIBRARIES
112     LibcMemoryHelpers
115 add_libc_unittest(
116   sprintf_test
117   SUITE
118     libc_stdio_unittests
119   SRCS
120     sprintf_test.cpp
121   DEPENDS
122     libc.src.stdio.sprintf
123     libc.src.__support.FPUtil.fp_bits
124     libc.src.__support.FPUtil.platform_defs
127 add_libc_unittest(
128   snprintf_test
129   SUITE
130     libc_stdio_unittests
131   SRCS
132     snprintf_test.cpp
133   DEPENDS
134     libc.src.stdio.snprintf
137 add_libc_unittest(
138   fprintf_test
139   SUITE
140     libc_stdio_unittests
141   SRCS
142     fprintf_test.cpp
143   DEPENDS
144     libc.src.stdio.fprintf
145     libc.src.stdio.fclose
146     libc.src.stdio.ferror
147     libc.src.stdio.fopen
148     libc.src.stdio.fread
152 add_libc_unittest(
153   printf_test
154   SUITE
155     libc_stdio_unittests
156   SRCS
157     printf_test.cpp
158   DEPENDS
159     libc.src.stdio.printf
162 add_libc_unittest(
163   fscanf_test
164   SUITE
165     libc_stdio_unittests
166   SRCS
167     fscanf_test.cpp
168   DEPENDS
169     libc.src.stdio.fscanf
170     libc.src.stdio.fclose
171     libc.src.stdio.ferror
172     libc.src.stdio.fopen
173     libc.src.stdio.fwrite
174     libc.src.__support.CPP.string_view
177 add_libc_unittest(
178   sscanf_test
179   SUITE
180     libc_stdio_unittests
181   SRCS
182     sscanf_test.cpp
183   DEPENDS
184     libc.src.stdio.sscanf
185   LINK_LIBRARIES
186     LibcFPTestHelpers
189 add_libc_unittest(
190   puts_test
191   SUITE
192     libc_stdio_unittests
193   SRCS
194     puts_test.cpp
195   DEPENDS
196     libc.src.stdio.puts
199 add_libc_unittest(
200   putc_test
201   SUITE
202     libc_stdio_unittests
203   SRCS
204     putc_test.cpp
205   DEPENDS
206     libc.src.stdio.putc
207     libc.src.stdio.fclose
208     libc.src.stdio.ferror
209     libc.src.stdio.fopen
210     libc.src.stdio.fread
213 if(${LIBC_TARGET_OS} STREQUAL "linux")
214   add_libc_unittest(
215     remove_test
216     SUITE
217       libc_stdio_unittests
218     SRCS
219       remove_test.cpp
220     DEPENDS
221       libc.include.errno
222       libc.include.unistd
223       libc.src.fcntl.open
224       libc.src.stdio.remove
225       libc.src.sys.stat.mkdirat
226       libc.src.unistd.access
227       libc.src.unistd.close
228   )
229 endif()
231 add_libc_unittest(
232   fgetc_test
233   SUITE
234     libc_stdio_unittests
235   SRCS
236     fgetc_test.cpp
237   DEPENDS
238     libc.include.errno
239     libc.include.stdio
240     libc.src.stdio.fclose
241     libc.src.stdio.feof
242     libc.src.stdio.ferror
243     libc.src.stdio.fgetc
244     libc.src.stdio.fopen
245     libc.src.stdio.fwrite
246     libc.src.stdio.getc
249 add_libc_unittest(
250   fgetc_unlocked_test
251   SUITE
252     libc_stdio_unittests
253   SRCS
254     fgetc_unlocked_test.cpp
255   DEPENDS
256     libc.include.errno
257     libc.include.stdio
258     libc.src.stdio.fclose
259     libc.src.stdio.ferror
260     libc.src.stdio.ferror_unlocked
261     libc.src.stdio.feof
262     libc.src.stdio.feof_unlocked
263     libc.src.stdio.fgetc_unlocked
264     libc.src.stdio.flockfile
265     libc.src.stdio.fopen
266     libc.src.stdio.funlockfile
267     libc.src.stdio.fwrite
268     libc.src.stdio.getc_unlocked
271 add_libc_unittest(
272   fgets_test
273   SUITE
274     libc_stdio_unittests
275   SRCS
276     fgets_test.cpp
277   DEPENDS
278     libc.include.errno
279     libc.include.stdio
280     libc.src.stdio.fclose
281     libc.src.stdio.feof
282     libc.src.stdio.ferror
283     libc.src.stdio.fgets
284     libc.src.stdio.fopen
285     libc.src.stdio.fwrite
288 add_libc_unittest(
289   ftell_test
290   SUITE
291     libc_stdio_unittests
292   SRCS
293     ftell_test.cpp
294   DEPENDS
295     libc.include.errno
296     libc.include.stdio
297     libc.src.stdio.fclose
298     libc.src.stdio.fflush
299     libc.src.stdio.fopen
300     libc.src.stdio.fread
301     libc.src.stdio.fseek
302     libc.src.stdio.ftell
303     libc.src.stdio.fwrite
304     libc.src.stdio.setvbuf
307 add_subdirectory(printf_core)
308 add_subdirectory(scanf_core)
309 add_subdirectory(testdata)