blob: 923db635c8a59f69a621de21fb24820cbd99c560 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
|
add_libc_testsuite(libc_support_unittests)
add_libc_unittest(
endian_test
SUITE
libc_support_unittests
SRCS
endian_test.cpp
DEPENDS
libc.src.__support.common
)
add_libc_unittest(
high_precision_decimal_test
SUITE
libc_support_unittests
SRCS
high_precision_decimal_test.cpp
DEPENDS
libc.src.__support.high_precision_decimal
)
add_libc_unittest(
str_to_float_test
SUITE
libc_support_unittests
SRCS
str_to_float_test.cpp
DEPENDS
libc.src.__support.str_to_float
)
add_executable(
libc_str_to_float_comparison_test
str_to_float_comparison_test.cpp
)
target_link_libraries(libc_str_to_float_comparison_test
PRIVATE
llvmlibc
)
set(float_test_file ${CMAKE_CURRENT_SOURCE_DIR}/str_to_float_comparison_data.txt)
add_custom_command(TARGET libc_str_to_float_comparison_test
POST_BUILD
COMMAND $<TARGET_FILE:libc_str_to_float_comparison_test> ${float_test_file}
DEPENDS ${float_test_file}
COMMENT "Test the strtof and strtod implementations against precomputed results."
VERBATIM)
add_subdirectory(CPP)
add_subdirectory(OSUtil)
|