Git commit 8d30418a4d3fcdd3808d5b00f02dab7a3ce71fd3 by Alexander Dymo. Committed on 24/10/2012 at 11:36. Pushed by dymo into branch 'master'. Test for a problem with Hash of unsure storage. Problem is not reproducible when all duchain tests are run, but is 100% reproducible when just this test is run. M +10 -0 duchain/tests/duchain.cpp M +1 -0 duchain/tests/duchain.h http://commits.kde.org/kdev-ruby/8d30418a4d3fcdd3808d5b00f02dab7a3ce71fd3 diff --git a/duchain/tests/duchain.cpp b/duchain/tests/duchain.cpp index 96f4bfa..1028862 100644 --- a/duchain/tests/duchain.cpp +++ b/duchain/tests/duchain.cpp @@ -409,6 +409,16 @@ void TestDUChain::simpleUnsure() testUnsureTypes(unsure, list); } = +void TestDUChain::unsureHash() +{ + // this test (when run separately from other tests) crashes + // when storing Hash of unsure (Bar::Foo, String) in the item reposito= ry + QByteArray code("class Bar; class Foo; end; x =3D [ Foo.new, 'test' ];= end"); + TopDUContext *top =3D parse(code, "unsureTypeStorage"); + + DOES_NOT_CRASH; +} + void TestDUChain::multipleAssignment1() { QByteArray code("a, b =3D 1, 'a'"); diff --git a/duchain/tests/duchain.h b/duchain/tests/duchain.h index d834cb4..be4861c 100644 --- a/duchain/tests/duchain.h +++ b/duchain/tests/duchain.h @@ -88,6 +88,7 @@ private slots: = // Assignments void simpleUnsure(); + void unsureHash(); void multipleAssignment1(); void multipleAssignment2(); void multipleAssignmentLeft();