MCPcopy Create free account
hub / github.com/KDE/kdevelop / testTypePtr

Method testTypePtr

kdevplatform/language/duchain/tests/test_duchain.cpp:939–958  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

937}
938
939void TestDUChain::testTypePtr()
940{
941 AbstractType::Ptr abstractT;
942 QVERIFY(!abstractT);
943
944 IntegralType::Ptr integralT(new IntegralType(IntegralType::TypeDouble));
945
946 abstractT = integralT;
947 QCOMPARE(abstractT.get(), integralT.get());
948
949 DelayedType::Ptr delayedT(new DelayedType);
950 QVERIFY(abstractT.get() != delayedT.get());
951 QVERIFY(!abstractT->equals(delayedT.get()));
952
953 auto abstractT2 = abstractT;
954 QCOMPARE(abstractT2.get(), integralT.get());
955
956 auto abstractT3 = AbstractType::Ptr(integralT);
957 QCOMPARE(abstractT2.get(), integralT.get());
958}
959
960void TestDUChain::testReferenceType()
961{

Callers

nothing calls this directly

Calls 2

getMethod · 0.45
equalsMethod · 0.45

Tested by

no test coverage detected