[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: [kdev-ruby] duchain/tests: Test for a problem with Hash of unsure storage.
From: Alexander Dymo <adymo () kdevelop ! org>
Date: 2012-10-24 9:38:49
Message-ID: 20121024093849.28F64A6078 () git ! kde ! org
[Download RAW message or body]
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 repository
+ QByteArray code("class Bar; class Foo; end; x = [ Foo.new, 'test' ]; end");
+ TopDUContext *top = parse(code, "unsureTypeStorage");
+
+ DOES_NOT_CRASH;
+}
+
void TestDUChain::multipleAssignment1()
{
QByteArray code("a, b = 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();
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic