diff options
Diffstat (limited to 'test/sanitizer_common/TestCases/Posix/lstat.cc')
-rw-r--r-- | test/sanitizer_common/TestCases/Posix/lstat.cc | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/test/sanitizer_common/TestCases/Posix/lstat.cc b/test/sanitizer_common/TestCases/Posix/lstat.cc index 37237d82102c..01c2ea83d9c1 100644 --- a/test/sanitizer_common/TestCases/Posix/lstat.cc +++ b/test/sanitizer_common/TestCases/Posix/lstat.cc @@ -1,16 +1,14 @@ // RUN: %clangxx -O0 -g %s -o %t && %run %t +#include <assert.h> #include <stdlib.h> #include <sys/stat.h> int main(void) { struct stat st; - if (lstat("/dev/null", &st)) - exit(1); - - if (!S_ISCHR(st.st_mode)) - exit(1); + assert(!lstat("/dev/null", &st)); + assert(S_ISCHR(st.st_mode)); return 0; } |