-
-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
59b4650
commit c50ccd6
Showing
8 changed files
with
585 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
enable_testing() | ||
|
||
find_package(Qt${QT_DEFAULT_MAJOR_VERSION} REQUIRED NO_MODULE COMPONENTS | ||
Test | ||
) | ||
|
||
function (MAKE_TEST NAME FILE LIB) | ||
add_executable( ${NAME} ${FILE} ) | ||
target_link_libraries( ${NAME} ${LIB} Qt::Test) | ||
add_test(NAME ${NAME} COMMAND $<TARGET_FILE:${NAME}>) | ||
set_tests_properties(${NAME} PROPERTIES DEPENDS ${LIB}) | ||
endfunction() | ||
|
||
add_subdirectory(data) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
MAKE_TEST(FF7Text_Tests FF7Text_test.cpp ff7tk) | ||
MAKE_TEST(FF7Save_Tests FF7Save_test.cpp ff7tk) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
#include <QtTest> | ||
|
||
#include "FF7Save_test.h" | ||
|
||
void FF7SaveTests::initTestCase() | ||
{ | ||
ff7save = new FF7Save(); | ||
} | ||
|
||
void FF7SaveTests::test_setSlotPsxRawData() | ||
{ | ||
ff7save->setFormat(FF7SaveInfo::FORMAT::PSX); | ||
ff7save->newGame(0); | ||
QVERIFY(ff7save->setSlotPsxRawData(0, _slotData)); | ||
} | ||
|
||
void FF7SaveTests::test_readPsxDesc() | ||
{ | ||
QString desc = QStringLiteral("FF7/SAVE15/99:28"); | ||
ff7save->setPsxDesc(desc, 0); | ||
QCOMPARE(ff7save->psxDesc(0), desc); | ||
} | ||
|
||
void FF7SaveTests::test_writePsxDesc() | ||
{ | ||
QString desc = QStringLiteral("VVVVVVVVVVVVVVVV"); | ||
ff7save->setPsxDesc(desc, 0); | ||
QCOMPARE(ff7save->psxDesc(0), desc); | ||
} | ||
|
||
QTEST_MAIN(FF7SaveTests) |
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.