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

Method testRuntimeSelfinit

cpplint_unittest.py:959–969  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

957 self.TestLint("auto x = implicit_cast<string &(*)(int)>(&foo);", "")
958
959 def testRuntimeSelfinit(self):
960 self.TestLint(
961 "Foo::Foo(Bar r, Bel l) : r_(r_), l_(l_) { }",
962 "You seem to be initializing a member variable with itself. [runtime/init] [4]",
963 )
964 self.TestLint(
965 "Foo::Foo(Bar r, Bel l) : r_(CHECK_NOTNULL(r_)) { }",
966 "You seem to be initializing a member variable with itself. [runtime/init] [4]",
967 )
968 self.TestLint("Foo::Foo(Bar r, Bel l) : r_(r), l_(l) { }", "")
969 self.TestLint("Foo::Foo(Bar r) : r_(r), l_(r_), ll_(l_) { }", "")
970
971 # Test for unnamed arguments in a method.
972 def testCheckForUnnamedParams(self):

Callers

nothing calls this directly

Calls 1

TestLintMethod · 0.80

Tested by

no test coverage detected