@@ -34,27 +34,35 @@ class SharedUnityMenuModelTest : public QObject
34 actions["test"] = QString("/com/canonical/%1/actions").arg(QString(testId));
34 actions["test"] = QString("/com/canonical/%1/actions").arg(QString(testId));
35 model->setActions(actions);
35 model->setActions(actions);
37−// QVERIFY(model->model() != nullptr);
38 return model;
37 return model;
41private Q_SLOTS:
40private Q_SLOTS:
42+ void testCreateModel()
44+ QSharedPointer<SharedUnityMenuModel> model(createFullModel("test1"));
45+ QVERIFY(model->model() != nullptr);
43− void testDifferentDataCreatesDifferentModels() {
48+ void testDifferentDataCreatesDifferentModels()
44 QSharedPointer<SharedUnityMenuModel> model1(createFullModel("test1"));
50 QSharedPointer<SharedUnityMenuModel> model1(createFullModel("test1"));
45 QSharedPointer<SharedUnityMenuModel> model2(createFullModel("test2"));
51 QSharedPointer<SharedUnityMenuModel> model2(createFullModel("test2"));
47 QVERIFY(model1->model() != model2->model());
53 QVERIFY(model1->model() != model2->model());
50− void testSameDataCreatesSameModels() {
56+ void testSameDataCreatesSameModels()
51 QSharedPointer<SharedUnityMenuModel> model1(createFullModel("test1"));
58 QSharedPointer<SharedUnityMenuModel> model1(createFullModel("test1"));
52 QSharedPointer<SharedUnityMenuModel> model2(createFullModel("test1"));
59 QSharedPointer<SharedUnityMenuModel> model2(createFullModel("test1"));
54 QCOMPARE(model1->model(), model2->model());
61 QCOMPARE(model1->model(), model2->model());
57− void testSharedOwnership() {
64+ void testSharedOwnership()
58 QSharedPointer<SharedUnityMenuModel> model1(createFullModel("test1"));
66 QSharedPointer<SharedUnityMenuModel> model1(createFullModel("test1"));
59 QSharedPointer<SharedUnityMenuModel> model2(createFullModel("test1"));
67 QSharedPointer<SharedUnityMenuModel> model2(createFullModel("test1"));
@@ -66,7 +74,8 @@ private Q_SLOTS:
68 // Tests that changing cached model data does not change the model path of others
76 // Tests that changing cached model data does not change the model path of others
69− void testLP1328646() {
77+ void testLP1328646()
70 QSharedPointer<SharedUnityMenuModel> model1(createFullModel("test1"));
79 QSharedPointer<SharedUnityMenuModel> model1(createFullModel("test1"));
71 QSharedPointer<SharedUnityMenuModel> model2(createFullModel("test1"));
80 QSharedPointer<SharedUnityMenuModel> model2(createFullModel("test1"));