From 6775ce3ad3e9bf3e2598143b7cac4b5ecdaafa93 Mon Sep 17 00:00:00 2001 From: Alexander Kornienko Date: Sun, 26 Oct 2014 02:21:32 +0000 Subject: [clang-tidy] Clean up test. Simplify RUN lines and make checks stricter, check messages instead of fixes. llvm-svn: 220633 --- clang-tools-extra/test/clang-tidy/select-checks.cpp | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) (limited to 'clang-tools-extra/test/clang-tidy/select-checks.cpp') diff --git a/clang-tools-extra/test/clang-tidy/select-checks.cpp b/clang-tools-extra/test/clang-tidy/select-checks.cpp index ce3d4f13ace..f2c2876127e 100644 --- a/clang-tools-extra/test/clang-tidy/select-checks.cpp +++ b/clang-tools-extra/test/clang-tidy/select-checks.cpp @@ -1,13 +1,11 @@ -// RUN: grep -Ev "// *[A-Z-]+:" %s > %t.cpp -// RUN: clang-tidy %t.cpp -fix -checks='-*,llvm-*' -- -// RUN: FileCheck -input-file=%t.cpp %s -// RUN: clang-tidy %s -checks='-*,an-unknown-check' -- 2>&1 | FileCheck -check-prefix=CHECK2 %s +// RUN: clang-tidy %s -checks='-*,llvm-namespace-*' -- 2>&1 | FileCheck -implicit-check-not='{{warning:|error:}}' %s +// RUN: clang-tidy %s -checks='-*,an-unknown-check' -- 2>&1 | FileCheck -implicit-check-not='{{warning:|error:}}' -check-prefix=CHECK2 %s // CHECK2: Error: no checks enabled. namespace i { } -// CHECK: } // namespace i +// CHECK: :[[@LINE-2]]:11: warning: namespace not terminated with a closing comment [llvm-namespace-comment] -class A { A(int i); }; // Not fixing this, because the check is in google-. -// CHECK: class A { A(int i); }; +// Expect no warnings from the google-explicit-constructor check: +class A { A(int i); }; -- cgit v1.2.3