Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
PIM
KDE PIM Add-ons
Commits
d2a46a00
Commit
d2a46a00
authored
May 31, 2016
by
Laurent Montel
😁
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Avoid redefinition variable
parent
77fcad8f
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
4 deletions
+4
-4
plugins/plasma/pimeventsplugin/autotests/CMakeLists.txt
plugins/plasma/pimeventsplugin/autotests/CMakeLists.txt
+1
-1
plugins/plasma/pimeventsplugin/autotests/testdataparser.cpp
plugins/plasma/pimeventsplugin/autotests/testdataparser.cpp
+3
-3
No files found.
plugins/plasma/pimeventsplugin/autotests/CMakeLists.txt
View file @
d2a46a00
...
...
@@ -9,7 +9,7 @@ macro(add_plasma_pimeventsplugin_test _source _additional)
add_executable
(
${
_name
}
${
_test
}
)
add_test
(
${
_name
}
${
_name
}
)
ecm_mark_as_test
(
plasma-pimeventsplugin-
${
_name
}
)
add_definitions
(
-D
QT_TESTCASE_BUILD
DIR=\"
${
CMAKE_CURRENT_SOURCE_DIR
}
\"
)
add_definitions
(
-D
PIMEVENT_DATA
DIR=\"
${
CMAKE_CURRENT_SOURCE_DIR
}
\"
)
target_link_libraries
(
${
_name
}
Qt5::Core
Qt5::Test
KF5::AkonadiCore
...
...
plugins/plasma/pimeventsplugin/autotests/testdataparser.cpp
View file @
d2a46a00
...
...
@@ -44,7 +44,7 @@ TestDataParser::~TestDataParser()
QStringList
TestDataParser
::
allTestData
()
{
QDir
testdir
(
QStringLiteral
(
QT_TESTCASE_BUILD
DIR
"/data"
));
QDir
testdir
(
QStringLiteral
(
PIMEVENT_DATA
DIR
"/data"
));
const
auto
data
=
testdir
.
entryInfoList
({
QStringLiteral
(
"*.json"
)
},
QDir
::
Files
);
QStringList
testcases
;
for
(
const
auto
&
fi
:
data
)
{
...
...
@@ -87,7 +87,7 @@ QDateTime TestDataParser::parseDateTime(const QJsonObject &dateTime)
void
TestDataParser
::
parse
()
{
QFile
icalFile
(
QStringLiteral
(
QT_TESTCASE_BUILD
DIR
"/data/%1.ics"
).
arg
(
mTestData
));
QFile
icalFile
(
QStringLiteral
(
PIMEVENT_DATA
DIR
"/data/%1.ics"
).
arg
(
mTestData
));
QVERIFY
(
icalFile
.
exists
());
QVERIFY
(
icalFile
.
open
(
QIODevice
::
ReadOnly
));
...
...
@@ -96,7 +96,7 @@ void TestDataParser::parse()
mIncidence
=
format
.
readIncidence
(
data
);
QVERIFY
(
mIncidence
);
QFile
jsonFile
(
QStringLiteral
(
QT_TESTCASE_BUILD
DIR
"/data/%1.json"
).
arg
(
mTestData
));
QFile
jsonFile
(
QStringLiteral
(
PIMEVENT_DATA
DIR
"/data/%1.json"
).
arg
(
mTestData
));
QVERIFY
(
jsonFile
.
exists
());
QVERIFY
(
jsonFile
.
open
(
QIODevice
::
ReadOnly
));
...
...
Write
Preview
Markdown
is supported
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