Changeset View
Changeset View
Standalone View
Standalone View
duchain/tests/uses.cpp
Context not available. | |||||
1067 | QVERIFY(b->uses().isEmpty()); | 1067 | QVERIFY(b->uses().isEmpty()); | ||
---|---|---|---|---|---|
1068 | } | 1068 | } | ||
1069 | 1069 | | |||
1070 | void TestUses::closureTypehints() { | ||||
1071 | TopDUContext* top = parse("<?php class A {} $b = function (A $a) {};", DumpNone); | ||||
1072 | QVERIFY(top); | ||||
1073 | DUChainReleaser releaseTop(top); | ||||
1074 | DUChainWriteLocker lock; | ||||
1075 | | ||||
1076 | QCOMPARE(top->localDeclarations().count(), 3); | ||||
1077 | Declaration* a = top->localDeclarations().at(0); | ||||
1078 | QCOMPARE(a->qualifiedIdentifier(), QualifiedIdentifier("a")); | ||||
1079 | compareUses(a, QList<RangeInRevision>() << RangeInRevision(0, 32, 0, 33)); | ||||
1080 | } | ||||
1081 | | ||||
1070 | void TestUses::instanceof() | 1082 | void TestUses::instanceof() | ||
1071 | { | 1083 | { | ||
1072 | // 0 1 2 3 4 5 | 1084 | // 0 1 2 3 4 5 | ||
Context not available. |