Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Telemetry
KUserFeedback
Commits
ecfb98bc
Commit
ecfb98bc
authored
Dec 30, 2016
by
Volker Krause
Browse files
Add unit test for schema templates
parent
83d2b704
Changes
2
Show whitespace changes
Inline
Side-by-side
tests/auto/CMakeLists.txt
View file @
ecfb98bc
...
...
@@ -13,6 +13,7 @@ function(uf_add_test _file)
endfunction
()
uf_add_test
(
producttest UserFeedbackAnalyzer
)
uf_add_test
(
schematemplatetest.cpp UserFeedbackAnalyzer
)
uf_add_test
(
productapitest UserFeedbackTestUtils
)
uf_add_test
(
productmodeltest UserFeedbackTestUtils
)
uf_add_test
(
schemamodeltest UserFeedbackTestUtils
)
...
...
tests/auto/schematemplatetest.cpp
0 → 100644
View file @
ecfb98bc
/*
Copyright (C) 2016 Volker Krause <vkrause@kde.org>
This program is free software; you can redistribute it and/or modify it
under the terms of the GNU Library General Public License as published by
the Free Software Foundation; either version 2 of the License, or (at your
option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public
License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include <core/schemaentry.h>
#include <core/schemaentryelement.h>
#include <core/schemaentrytemplates.h>
#include <QDebug>
#include <QtTest/qtest.h>
#include <QObject>
#include <QStandardPaths>
using
namespace
UserFeedback
::
Analyzer
;
class
SchemaTemplateTest
:
public
QObject
{
Q_OBJECT
private
slots
:
void
initTestCase
()
{
Q_INIT_RESOURCE
(
schemaentrytemplates
);
QStandardPaths
::
setTestModeEnabled
(
true
);
}
void
testTemplateLoading
()
{
QVERIFY
(
SchemaEntryTemplates
::
availableTemplates
().
size
()
>
5
);
for
(
const
auto
&
t
:
SchemaEntryTemplates
::
availableTemplates
())
{
QVERIFY
(
!
t
.
name
().
isEmpty
());
QVERIFY
(
!
t
.
elements
().
isEmpty
());
}
}
};
QTEST_MAIN
(
SchemaTemplateTest
)
#include "schematemplatetest.moc"
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment