diff --git a/trunk/ConsoleDataMigration/sources/ConsoleRestore/PreinstallImporter.cpp b/trunk/ConsoleDataMigration/sources/ConsoleRestore/PreinstallImporter.cpp index 620934a..1d1d0d7 100644 --- a/trunk/ConsoleDataMigration/sources/ConsoleRestore/PreinstallImporter.cpp +++ b/trunk/ConsoleDataMigration/sources/ConsoleRestore/PreinstallImporter.cpp @@ -44,7 +44,7 @@ nn::Result PreinstallImporter::SetupSd(bool* isAlreadyAvailable) ); // タイトルデータベースを作成する - if (!isAlreadyAvailable) + if (!*isAlreadyAvailable) { NN_UTIL_RETURN_IF_FAILED( nn::am::InitializeExternalTitleDatabase() diff --git a/trunk/ConsoleDataMigration/sources/tests/ConsoleRestore/PreinstallImporter/test_PreinstallImporter.cpp b/trunk/ConsoleDataMigration/sources/tests/ConsoleRestore/PreinstallImporter/test_PreinstallImporter.cpp index ef16e89..522c00f 100644 --- a/trunk/ConsoleDataMigration/sources/tests/ConsoleRestore/PreinstallImporter/test_PreinstallImporter.cpp +++ b/trunk/ConsoleDataMigration/sources/tests/ConsoleRestore/PreinstallImporter/test_PreinstallImporter.cpp @@ -40,9 +40,11 @@ public: PreinstallImporterTest() { TEST_ADD(PreinstallImporterTest::ListUp); + TEST_ADD(PreinstallImporterTest::SetupSd); } private: void ListUp(); + void SetupSd(); }; namespace @@ -111,6 +113,15 @@ void PreinstallImporterTest::ListUp() } } +void PreinstallImporterTest::SetupSd() +{ + ConsoleRestore::PreinstallImporter importer; + + bool isAlreadyInitialized = false; + importer.SetupSd(&isAlreadyInitialized); + NN_TEST_ASSERT(isAlreadyInitialized); + +} NN_TEST_DEFINE_MAIN(PreinstallImporterTest) /*---------------------------------------------------------------------------*