diff options
author | Kevin Ottens <kevin.ottens@kdab.com> | 2015-12-01 13:11:04 +0100 |
---|---|---|
committer | Kevin Ottens <kevin.ottens@kdab.com> | 2015-12-01 14:24:05 +0000 |
commit | 25737a39a63e7295650975c1359b9868461018ad (patch) | |
tree | 7b6c5aa524f51f91be3cbdd3e970fa5ad0244cb6 /tests | |
parent | bb2e5c6ec62f9bc23cea2c67f129fe1f7873b1be (diff) |
QAspectFactory can now also give registered name of an aspect
Change-Id: I8f89eefb06e20943f7abb82d461b5e90fd9799f9
Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
Diffstat (limited to 'tests')
-rw-r--r-- | tests/auto/core/qaspectfactory/tst_qaspectfactory.cpp | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/tests/auto/core/qaspectfactory/tst_qaspectfactory.cpp b/tests/auto/core/qaspectfactory/tst_qaspectfactory.cpp index 11e5deaa0..bee09be77 100644 --- a/tests/auto/core/qaspectfactory/tst_qaspectfactory.cpp +++ b/tests/auto/core/qaspectfactory/tst_qaspectfactory.cpp @@ -89,6 +89,20 @@ private Q_SLOTS: QVERIFY(aspect->parent() == Q_NULLPTR); } + void shouldKnowAspectNames() + { + // GIVEN + QAspectFactory factory; + + // WHEN + DefaultFakeAspect fake; + AnotherFakeAspect missing; + + // THEN + QCOMPARE(factory.aspectName(&fake), QString("default")); + QCOMPARE(factory.aspectName(&missing), QString()); + } + void shouldGracefulyHandleMissingFactories() { // GIVEN |