summaryrefslogtreecommitdiff
path: root/libc/test/src/__support/CPP/CMakeLists.txt
blob: 28db8bdd5c87b4ee84ea1370beee5f74b2f91ab0 (plain)
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
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
add_custom_target(libc-cpp-utils-tests)

add_libc_test(
  bitset_test
  SUITE
    libc-cpp-utils-tests
  SRCS
    bitset_test.cpp
  DEPENDS
    libc.src.__support.CPP.bitset
)

add_libc_test(
  cstddef_test
  SUITE
    libc-cpp-utils-tests
  SRCS
    cstddef_test.cpp
  DEPENDS
    libc.src.__support.CPP.cstddef
)

add_libc_test(
  stringview_test
  SUITE
    libc-cpp-utils-tests
  SRCS
    stringview_test.cpp
  DEPENDS
    libc.src.__support.CPP.string_view
)

add_libc_test(
  limits_test
  SUITE
    libc-cpp-utils-tests
  SRCS
    limits_test.cpp
  DEPENDS
    libc.src.__support.CPP.limits
    libc.src.__support.uint
)

add_libc_test(
  int_seq_test
  SUITE
    libc-cpp-utils-tests
  SRCS
    integer_sequence_test.cpp
  DEPENDS
    libc.src.__support.CPP.utility
)


# This test fails with invalid address space operations on sm_60
if(NOT LIBC_GPU_TARGET_ARCHITECTURE_IS_NVPTX)
  add_libc_test(
    atomic_test
    SUITE
      libc-cpp-utils-tests
    SRCS
      atomic_test.cpp
    DEPENDS
      libc.src.__support.CPP.atomic
  )
endif()

# This test fails with a segmentation fault on NVPTX.
if(NOT LIBC_GPU_TARGET_ARCHITECTURE_IS_NVPTX)
  add_libc_test(
    stringstream_test
    SUITE
      libc-cpp-utils-tests
    SRCS
      stringstream_test.cpp
    DEPENDS
      libc.src.__support.CPP.span
      libc.src.__support.CPP.stringstream
  )
endif()

add_libc_test(
  optional_test
  SUITE
    libc-cpp-utils-tests
  SRCS
    optional_test.cpp
  DEPENDS
    libc.src.__support.CPP.optional
)

add_libc_test(
  span_test
  SUITE
    libc-cpp-utils-tests
  SRCS
    span_test.cpp
  DEPENDS
    libc.src.__support.CPP.span
)

add_libc_test(
  string_test
  # This test relies on 'realloc' which is not implemented for hermetic tests.
  UNIT_TEST_ONLY
  SUITE
    libc-cpp-utils-tests
  SRCS
    string_test.cpp
  DEPENDS
  libc.src.__support.CPP.string
  libc.src.__support.CPP.string_view
)