[clang][modules] Don't prevent translation of FW_Private includes when explicitly...
[llvm-project.git] / compiler-rt / test / sanitizer_common / TestCases / strnlen.c
blob8ab8ec91151d726076458ffb3899476ec27c357d
1 // RUN: %clang %s -o %t && %run %t 2>&1
3 #include <assert.h>
4 #include <string.h>
5 int main(int argc, char **argv) {
6 const char *s = "mytest";
7 assert(strnlen(s, 0) == 0UL);
8 assert(strnlen(s, 1) == 1UL);
9 assert(strnlen(s, 6) == strlen(s));
10 assert(strnlen(s, 7) == strlen(s));
11 return 0;