summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/auto/core/qaspectfactory/tst_qaspectfactory.cpp14
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