Git commit dd7cfab97b65a419a0983b23a8c62a1a2cae0a5a by Alexander Dymo. Committed on 23/10/2012 at 19:15. Pushed by dymo into branch 'master'. Test for singleton method visibility (crashes right now) M +8 -0 duchain/tests/duchain.cpp M +1 -0 duchain/tests/duchain.h http://commits.kde.org/kdev-ruby/dd7cfab97b65a419a0983b23a8c62a1a2cae0a5a diff --git a/duchain/tests/duchain.cpp b/duchain/tests/duchain.cpp index 9d33dba..96f4bfa 100644 --- a/duchain/tests/duchain.cpp +++ b/duchain/tests/duchain.cpp @@ -871,6 +871,14 @@ void TestDUChain::singletonClass3() DOES_NOT_CRASH; } = +void TestDUChain::singletonMethodVisibility() +{ + QByteArray code("class << Foo; private; def foo; end; end"); + TopDUContext *top =3D parse(code, "singletonMethodVisibility"); + + DOES_NOT_CRASH; +} + void TestDUChain::accessPolicyMethodInClass() { QByteArray code("class Klass; def foo; end; protected; def asd; end; "= ); diff --git a/duchain/tests/duchain.h b/duchain/tests/duchain.h index 52c8b63..d834cb4 100644 --- a/duchain/tests/duchain.h +++ b/duchain/tests/duchain.h @@ -118,6 +118,7 @@ private slots: void singletonClass1(); void singletonClass2(); void singletonClass3(); + void singletonMethodVisibility(); void accessPolicyMethodInClass(); void accessPolicyMethodInModule(); void accessPolicyOnBlock();