MCPcopy Index your code
hub / github.com/cpplint/cpplint / testCheckForUnnamedParams

Method testCheckForUnnamedParams

cpplint_unittest.py:972–1002  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

970
971 # Test for unnamed arguments in a method.
972 def testCheckForUnnamedParams(self):
973 self.TestLint("virtual void Func(int*) const;", "")
974 self.TestLint("virtual void Func(int*);", "")
975 self.TestLint("void Method(char*) {", "")
976 self.TestLint("void Method(char*);", "")
977 self.TestLint("static void operator delete[](void*) throw();", "")
978 self.TestLint("int Method(int);", "")
979
980 self.TestLint("virtual void Func(int* p);", "")
981 self.TestLint("void operator delete(void* x) throw();", "")
982 self.TestLint("void Method(char* x) {", "")
983 self.TestLint("void Method(char* /*x*/) {", "")
984 self.TestLint("void Method(char* x);", "")
985 self.TestLint("typedef void (*Method)(int32_t x);", "")
986 self.TestLint("static void operator delete[](void* x) throw();", "")
987 self.TestLint("static void operator delete[](void* /*x*/) throw();", "")
988
989 self.TestLint("X operator++(int);", "")
990 self.TestLint("X operator++(int) {", "")
991 self.TestLint("X operator--(int);", "")
992 self.TestLint("X operator--(int /*unused*/) {", "")
993 self.TestLint("MACRO(int);", "")
994 self.TestLint("MACRO(func(int));", "")
995 self.TestLint("MACRO(arg, func(int));", "")
996
997 self.TestLint("void (*func)(void*);", "")
998 self.TestLint("void Func((*func)(void*)) {}", "")
999 self.TestLint("template <void Func(void*)> void func();", "")
1000 self.TestLint("virtual void f(int /*unused*/) {", "")
1001 self.TestLint("void f(int /*unused*/) override {", "")
1002 self.TestLint("void f(int /*unused*/) final {", "")
1003
1004 # Test deprecated casts such as int(d)
1005 def testDeprecatedCast(self):

Callers

nothing calls this directly

Calls 1

TestLintMethod · 0.80

Tested by

no test coverage detected