From 6f67bcbb93bda6cf0654a74721de97a3adc1605b Mon Sep 17 00:00:00 2001 From: Alexander Kornienko Date: Thu, 23 Nov 2017 17:02:48 +0000 Subject: [clang-tidy] rename_check.py misc-argument-comment bugprone-argument-comment Summary: + manually convert the unit test to lit test. Reviewers: hokein Reviewed By: hokein Subscribers: mgorny, xazax.hun, cfe-commits Differential Revision: https://reviews.llvm.org/D40392 llvm-svn: 318926 --- .../unittests/clang-tidy/MiscModuleTest.cpp | 39 ---------------------- 1 file changed, 39 deletions(-) delete mode 100644 clang-tools-extra/unittests/clang-tidy/MiscModuleTest.cpp (limited to 'clang-tools-extra/unittests/clang-tidy/MiscModuleTest.cpp') diff --git a/clang-tools-extra/unittests/clang-tidy/MiscModuleTest.cpp b/clang-tools-extra/unittests/clang-tidy/MiscModuleTest.cpp deleted file mode 100644 index a3f00b83ca1..00000000000 --- a/clang-tools-extra/unittests/clang-tidy/MiscModuleTest.cpp +++ /dev/null @@ -1,39 +0,0 @@ -#include "ClangTidyTest.h" -#include "misc/ArgumentCommentCheck.h" -#include "gtest/gtest.h" - -namespace clang { -namespace tidy { -namespace test { - -using misc::ArgumentCommentCheck; - -TEST(ArgumentCommentCheckTest, CorrectComments) { - EXPECT_NO_CHANGES(ArgumentCommentCheck, - "void f(int x, int y); void g() { f(/*x=*/0, /*y=*/0); }"); - EXPECT_NO_CHANGES(ArgumentCommentCheck, - "struct C { C(int x, int y); }; C c(/*x=*/0, /*y=*/0);"); -} - -TEST(ArgumentCommentCheckTest, ThisEditDistanceAboveThreshold) { - EXPECT_NO_CHANGES(ArgumentCommentCheck, - "void f(int xxx); void g() { f(/*xyz=*/0); }"); -} - -TEST(ArgumentCommentCheckTest, OtherEditDistanceAboveThreshold) { - EXPECT_EQ("void f(int xxx, int yyy); void g() { f(/*xxx=*/0, 0); }", - runCheckOnCode( - "void f(int xxx, int yyy); void g() { f(/*Zxx=*/0, 0); }")); - EXPECT_EQ("struct C { C(int xxx, int yyy); }; C c(/*xxx=*/0, 0);", - runCheckOnCode( - "struct C { C(int xxx, int yyy); }; C c(/*Zxx=*/0, 0);")); -} - -TEST(ArgumentCommentCheckTest, OtherEditDistanceBelowThreshold) { - EXPECT_NO_CHANGES(ArgumentCommentCheck, - "void f(int xxx, int yyy); void g() { f(/*xxy=*/0, 0); }"); -} - -} // namespace test -} // namespace tidy -} // namespace clang -- cgit v1.2.3