[compiler-rt] r349917 - [Sanitizer] Move the unit test in the right place.
David Carlier via llvm-commits
llvm-commits at lists.llvm.org
Fri Dec 21 07:43:32 PST 2018
Author: devnexen
Date: Fri Dec 21 07:43:32 2018
New Revision: 349917
URL: http://llvm.org/viewvc/llvm-project?rev=349917&view=rev
Log:
[Sanitizer] Move the unit test in the right place.
Added:
compiler-rt/trunk/test/sanitizer_common/TestCases/Posix/strtonum.cc
- copied unchanged from r349916, compiler-rt/trunk/test/sanitizer_common/TestCases/NetBSD/strtonum.cc
Removed:
compiler-rt/trunk/test/sanitizer_common/TestCases/NetBSD/strtonum.cc
Removed: compiler-rt/trunk/test/sanitizer_common/TestCases/NetBSD/strtonum.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/sanitizer_common/TestCases/NetBSD/strtonum.cc?rev=349916&view=auto
==============================================================================
--- compiler-rt/trunk/test/sanitizer_common/TestCases/NetBSD/strtonum.cc (original)
+++ compiler-rt/trunk/test/sanitizer_common/TestCases/NetBSD/strtonum.cc (removed)
@@ -1,54 +0,0 @@
-// RUN: %clangxx -O0 -g %s -o %t && %run %t 2>&1 | FileCheck %s
-//
-// UNSUPPORTED: linux, darwin, solaris
-
-#define _OPENBSD_SOURCE
-
-#include <assert.h>
-#include <stdio.h>
-#include <stdlib.h>
-
-int main(void) {
- const char *errstr;
-
- printf("strtonum\n");
-
- long long l = strtonum("100", 1, 100, &errstr);
- assert(!errstr);
- printf("%lld\n", l);
-
- l = strtonum("200", 1, 100, &errstr);
- assert(errstr);
- printf("%s\n", errstr);
-
- l = strtonum("300", 1000, 1001, &errstr);
- assert(errstr);
- printf("%s\n", errstr);
-
- l = strtonum("abc", 1000, 1001, &errstr);
- assert(errstr);
- printf("%s\n", errstr);
-
- l = strtonum("1000", 1001, 1000, &errstr);
- assert(errstr);
- printf("%s\n", errstr);
-
- l = strtonum("1000abc", 1000, 1001, &errstr);
- assert(errstr);
- printf("%s\n", errstr);
-
- l = strtonum("1000.0", 1000, 1001, &errstr);
- assert(errstr);
- printf("%s\n", errstr);
-
- // CHECK: strtonum
- // CHECK: 100
- // CHECK: too large
- // CHECK: too small
- // CHECK: invalid
- // CHECK: invalid
- // CHECK: invalid
- // CHECK: invalid
-
- return 0;
-}
More information about the llvm-commits
mailing list