• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 // RUN: %clang %s -o %t && %run %t 2>&1
2 
3 #include <assert.h>
4 #include <string.h>
main(int argc,char ** argv)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;
12 }
13