Files
llvm-project/clang-tools-extra/unittests/clang-tidy/GoogleModuleTest.cpp
Chandler Carruth 85e6e87171 Run llvm/utils/sort_includes.py over the Clang tools code. This doesn't
always produce as pretty of results as it does in LLVM and Clang, but
I don't mind and the value of having a single canonical ordering is very
high IMO.

Let me know if you spot really serious problems here.

llvm-svn: 198703
2014-01-07 20:05:01 +00:00

26 lines
715 B
C++

#include "ClangTidyTest.h"
#include "google/GoogleTidyModule.h"
namespace clang {
namespace tidy {
typedef ClangTidyTest<ExplicitConstructorCheck> ExplicitConstructorCheckTest;
TEST_F(ExplicitConstructorCheckTest, SingleArgumentConstructorsOnly) {
expectNoChanges("class C { C(); };");
expectNoChanges("class C { C(int i, int j); };");
}
TEST_F(ExplicitConstructorCheckTest, Basic) {
EXPECT_EQ("class C { explicit C(int i); };",
runCheckOn("class C { C(int i); };"));
}
TEST_F(ExplicitConstructorCheckTest, DefaultParameters) {
EXPECT_EQ("class C { explicit C(int i, int j = 0); };",
runCheckOn("class C { C(int i, int j = 0); };"));
}
} // namespace tidy
} // namespace clang