summaryrefslogtreecommitdiffstats
path: root/compiler-rt/lib/msan/lit_tests/getline.cc
diff options
context:
space:
mode:
authorAlexey Samsonov <samsonov@google.com>2014-02-14 13:02:58 +0000
committerAlexey Samsonov <samsonov@google.com>2014-02-14 13:02:58 +0000
commit8434e60f7e2d8e5da48d94f612cf980a5d63bcec (patch)
tree50cad838f4fa63729797db962033eb72ddcb0fe1 /compiler-rt/lib/msan/lit_tests/getline.cc
parent0de2b9b1e2d7a24a54b64e7302536b59c3010c38 (diff)
downloadbcm5719-llvm-8434e60f7e2d8e5da48d94f612cf980a5d63bcec.tar.gz
bcm5719-llvm-8434e60f7e2d8e5da48d94f612cf980a5d63bcec.zip
Move MSan lit-tests under test/msan
llvm-svn: 201412
Diffstat (limited to 'compiler-rt/lib/msan/lit_tests/getline.cc')
-rw-r--r--compiler-rt/lib/msan/lit_tests/getline.cc30
1 files changed, 0 insertions, 30 deletions
diff --git a/compiler-rt/lib/msan/lit_tests/getline.cc b/compiler-rt/lib/msan/lit_tests/getline.cc
deleted file mode 100644
index 27168a88560..00000000000
--- a/compiler-rt/lib/msan/lit_tests/getline.cc
+++ /dev/null
@@ -1,30 +0,0 @@
-// RUN: %clangxx_msan -O0 %s -o %t && %t %p
-
-#include <assert.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-
-int main(int argc, char **argv) {
- assert(argc == 2);
- char buf[1024];
- snprintf(buf, sizeof(buf), "%s/%s", argv[1], "getline_test_data");
-
- FILE *fp = fopen(buf, "r");
- assert(fp);
-
- char *line = 0;
- size_t len = 0;
- int n = getline(&line, &len, fp);
- assert(n == 6);
- assert(strcmp(line, "abcde\n") == 0);
-
- n = getline(&line, &len, fp);
- assert(n == 6);
- assert(strcmp(line, "12345\n") == 0);
-
- free(line);
- fclose(fp);
-
- return 0;
-}
OpenPOWER on IntegriCloud