| 1 |
# This file is licensed under the Apache License v2.0 with LLVM Exceptions. |
| 2 |
# See https://llvm.org/LICENSE.txt for license information. |
| 3 |
# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception |
| 4 |
|
| 5 |
# Tests for LLVM libc strings.h functions. |
| 6 |
|
| 7 |
load("//libc/test:libc_test_rules.bzl", "libc_test") |
| 8 |
|
| 9 |
package(default_visibility = ["//visibility:public"]) |
| 10 |
|
| 11 |
licenses(["notice"]) |
| 12 |
|
| 13 |
libc_test( |
| 14 |
name = "bcopy_test", |
| 15 |
srcs = ["bcopy_test.cpp"], |
| 16 |
deps = [ |
| 17 |
"//libc:__support_cpp_span", |
| 18 |
"//libc:bcopy", |
| 19 |
"//libc/test/UnitTest:memory_matcher", |
| 20 |
"//libc/test/src/string:memory_check_utils", |
| 21 |
], |
| 22 |
) |
| 23 |
|
| 24 |
libc_test( |
| 25 |
name = "bcmp_test", |
| 26 |
srcs = ["bcmp_test.cpp"], |
| 27 |
deps = [ |
| 28 |
"//libc:bcmp", |
| 29 |
"//libc/test/UnitTest:test_logger", |
| 30 |
"//libc/test/src/string:memory_check_utils", |
| 31 |
], |
| 32 |
) |
| 33 |
|
| 34 |
libc_test( |
| 35 |
name = "bzero_test", |
| 36 |
srcs = ["bzero_test.cpp"], |
| 37 |
deps = [ |
| 38 |
"//libc:bzero", |
| 39 |
"//libc/test/src/string:memory_check_utils", |
| 40 |
], |
| 41 |
) |
| 42 |
|
| 43 |
libc_test( |
| 44 |
name = "index_test", |
| 45 |
srcs = ["index_test.cpp"], |
| 46 |
deps = [ |
| 47 |
"//libc:index", |
| 48 |
"//libc/test/src/string:strchr_test_helper", |
| 49 |
], |
| 50 |
) |
| 51 |
|
| 52 |
libc_test( |
| 53 |
name = "rindex_test", |
| 54 |
srcs = ["rindex_test.cpp"], |
| 55 |
deps = [ |
| 56 |
"//libc:rindex", |
| 57 |
"//libc/test/src/string:strchr_test_helper", |
| 58 |
], |
| 59 |
) |
| 60 |
|
| 61 |
libc_test( |
| 62 |
name = "strcasecmp_test", |
| 63 |
srcs = ["strcasecmp_test.cpp"], |
| 64 |
deps = [ |
| 65 |
"//libc:strcasecmp", |
| 66 |
], |
| 67 |
) |
| 68 |
|
| 69 |
libc_test( |
| 70 |
name = "strncasecmp_test", |
| 71 |
srcs = ["strncasecmp_test.cpp"], |
| 72 |
deps = [ |
| 73 |
"//libc:strncasecmp", |
| 74 |
], |
| 75 |
) |