mirror of
https://github.com/rvtr/ctr_Repair.git
synced 2025-10-31 13:51:08 -04:00
テストのビルドが通るように
git-svn-id: file:///Volumes/Transfer/gigaleak_20231201/2020-05-23%20-%20ctr.7z%20+%20svn_v1.068.zip/ctr/svn/ctr_Repair@569 385bec56-5757-e545-9c3a-d8741f4650f1
This commit is contained in:
parent
b4b01e1c1e
commit
254277f7b1
@ -54,50 +54,6 @@ NTP_Packet s_NTPSendPacket; // 送信するNTPパケット
|
||||
NTP_Packet s_NTPRecvPacket; // 受信するNTPパケット
|
||||
const u32 NTP_PORT_NUM = 123;
|
||||
|
||||
nn::Result InitializeNetwork(void)
|
||||
{
|
||||
nn::Result result;
|
||||
nn::ac::Config config;
|
||||
|
||||
result = nn::ac::Initialize();
|
||||
COMMON_LOGGER_RESULT_IF_FAILED_WITH_LINE(result);
|
||||
|
||||
// 接続要求用のパラメータを作成
|
||||
result = nn::ac::CreateDefaultConfig(&config);
|
||||
if (result.IsFailure())
|
||||
{
|
||||
COMMON_LOGGER_RESULT_IF_FAILED_WITH_LINE(result);
|
||||
return result;
|
||||
}
|
||||
|
||||
// デバッグ用に接続テストを無効化
|
||||
nn::ac::DebugSetNetworkArea(&config, nn::ac::NETWORK_AREA_LAN);
|
||||
|
||||
// 接続要求を発行
|
||||
result = nn::ac::ConnectWithoutEula(config);
|
||||
if (result.IsFailure())
|
||||
{
|
||||
COMMON_LOGGER_RESULT_IF_FAILED_WITH_LINE(result);
|
||||
return result;
|
||||
}
|
||||
|
||||
return nn::ResultSuccess();
|
||||
}
|
||||
|
||||
nn::Result FinalizeNetwork(void)
|
||||
{
|
||||
nn::Result result;
|
||||
|
||||
// 接続要求用のパラメータを作成
|
||||
result = nn::ac::Close();
|
||||
NN_UTIL_RETURN_IF_FAILED(result);
|
||||
|
||||
result = nn::ac::Finalize();
|
||||
COMMON_LOGGER_RESULT_IF_FAILED_WITH_LINE(result);
|
||||
|
||||
return nn::ResultSuccess();
|
||||
}
|
||||
|
||||
bool GetNtpTime(u32* ntpTime)
|
||||
{
|
||||
nn::Result result;
|
||||
@ -106,7 +62,7 @@ bool GetNtpTime(u32* ntpTime)
|
||||
NN_LOG("Initializing network.\n");
|
||||
|
||||
// 本体に書き込まれているネットワーク設定を使ってネットワーク接続を初期化
|
||||
result = InitializeNetwork();
|
||||
result = common::InitializeNetwork();
|
||||
COMMON_LOGGER_RESULT_IF_FAILED_WITH_LINE(result);
|
||||
|
||||
{
|
||||
@ -276,7 +232,7 @@ bool GetNtpTime(u32* ntpTime)
|
||||
}
|
||||
|
||||
NN_LOG("Finalizing network.\n");
|
||||
result = FinalizeNetwork();
|
||||
result = common::FinalizeNetwork();
|
||||
COMMON_LOGGER_RESULT_IF_FAILED_WITH_LINE(result);
|
||||
|
||||
return retval;
|
||||
|
||||
@ -32,11 +32,11 @@ TEST_COMMON_SOURCES[] =
|
||||
../../../common/LogConsole.cpp
|
||||
../../../common/CommonLogger.cpp
|
||||
../../../common/SdMountManager.cpp
|
||||
../../../common/PlayHistoryManager.cpp
|
||||
../../../common/VersionDetect.cpp
|
||||
../../../common/HardwareStateManager.cpp
|
||||
../../../common/FileTransfer.cpp
|
||||
../../../common/SdReaderWriter.cpp
|
||||
../../../common/SaveDatamover.cpp
|
||||
|
||||
|
||||
SOURCES_TEST[] = test_Exporter.cpp
|
||||
@ -54,7 +54,7 @@ LIBS += libnn_test \
|
||||
|
||||
|
||||
ROM_SPEC_FILE = ../../../ConsoleBackup/ConsoleBackup.rsf
|
||||
DESCRIPTOR = $(HORIZON_ROOT)/resources/specfiles/_private/RepairTool.desc
|
||||
DESCRIPTOR = $(HORIZON_ROOT)/resources/specfiles/private/RepairTool.desc
|
||||
|
||||
|
||||
include $(makePlatformDefsPath build.tests)
|
||||
|
||||
@ -65,10 +65,11 @@ bool ExporterTest::InitializeSuite()
|
||||
nn::am::InitializeForSystemMenu();
|
||||
|
||||
// ヒープの確保
|
||||
common::HeapManager::GetHeap()->Initialize(nn::os::GetDeviceMemoryAddress(), nn::os::GetDeviceMemorySize(), nn::os::ALLOCATE_OPTION_LINEAR);
|
||||
common::InitializeHeap();
|
||||
common::HeapManager gxHeap(s_GxHeapSize);
|
||||
|
||||
// RenderSystem の準備
|
||||
uptr heapForGx = reinterpret_cast<uptr>(common::HeapManager::GetHeap()->Allocate(s_GxHeapSize));
|
||||
uptr heapForGx = reinterpret_cast<uptr>(gxHeap.GetAddr());
|
||||
demo::RenderSystemDrawing renderSystem;
|
||||
renderSystem.Initialize(heapForGx, s_GxHeapSize);
|
||||
|
||||
|
||||
@ -15,6 +15,6 @@
|
||||
#----------------------------------------------------------------------------
|
||||
|
||||
if $(IsTestBuild)
|
||||
.SUBDIRS: TitleDownloader
|
||||
.SUBDIRS: TitleDownloader BgsCommunicator
|
||||
|
||||
DefineDefaultRules()
|
||||
|
||||
@ -31,6 +31,7 @@ TEST_COMMON_SOURCES[] =
|
||||
../../../common/CommonLogger.cpp
|
||||
../../../common/SdMountManager.cpp
|
||||
../../../common/VersionDetect.cpp
|
||||
../../../common/FileTransfer.cpp
|
||||
|
||||
|
||||
SOURCES_TEST[] = test_Util.cpp
|
||||
@ -46,7 +47,7 @@ LIBS += libnn_test \
|
||||
|
||||
|
||||
ROM_SPEC_FILE = ../../../ConsoleRestore/ConsoleRestore.rsf
|
||||
DESCRIPTOR = $(HORIZON_ROOT)/resources/specfiles/_private/RepairTool.desc
|
||||
DESCRIPTOR = $(HORIZON_ROOT)/resources/specfiles/private/RepairTool.desc
|
||||
|
||||
|
||||
include $(makePlatformDefsPath build.tests)
|
||||
|
||||
@ -161,7 +161,7 @@ void UtilTest::GetSaveDataDirectoryRoot()
|
||||
std::wcstombs(saveDataRootStr, tmp.c_str(), tmp.size());
|
||||
|
||||
std::string sysSaveRoot;
|
||||
common::Util::GetSaveDataDirectoryRoot(sysSaveRoot, &ivs, ivsSize);
|
||||
common::Util::GetSaveDataDirectoryRoot(sysSaveRoot);
|
||||
|
||||
NN_TEST_ASSERT_EQUAL(std::strcmp(sysSaveRoot.c_str(), saveDataRootStr), 0);
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user