追加忘れ

git-svn-id: file:///Volumes/Transfer/gigaleak_20231201/2020-05-23%20-%20ctr.7z%20+%20svn_v1.068.zip/ctr/svn/ctr_Repair@234 385bec56-5757-e545-9c3a-d8741f4650f1
This commit is contained in:
N2614 2011-04-27 06:51:18 +00:00
parent 32350f630b
commit 976fe4cd92

View File

@ -0,0 +1,109 @@
/*---------------------------------------------------------------------------*
Project: Horizon
File: test_Util.cpp
Copyright 2009 Nintendo. All rights reserved.
These coded instructions, statements, and computer programs contain
proprietary information of Nintendo of America Inc. and/or Nintendo
Company Ltd., and are protected by Federal copyright law. They may
not be disclosed to third parties or copied or duplicated in any form,
in whole or in part, without the prior written consent of Nintendo.
$Rev$
*---------------------------------------------------------------------------*/
#include <nn.h>
#include <nn/test/test_Test.h>
#include <nn/cfg/CTR/cfg_ApiSys.h>
#include <nn/fs.h>
#include <nn/fs/CTR/fs_ArchiveTypesForSystem.h>
#include <nn/fs/CTR/MPCore/fs_FileSystemBasePrivate.h>
#include <nn/fs/fs_ApiSysSaveData.h>
#include <nn/am.h>
#include "demo.h"
#include "common_Types.h"
#include "CommonLogger.h"
#include "HeapManager.h"
#include "TitleDownloader.h"
using namespace nn::test;
class TitleDownloaderTest : public Suite {
public:
virtual bool InitializeSuite();
virtual void FinalizeSuite();
TitleDownloaderTest() {
SUITE_NAME("TestUtil");
TEST_ADD(TitleDownloaderTest::ListUp);
}
private:
void ListUp();
};
namespace
{
const size_t s_GxHeapSize = 0x800000;
}
//------------------------------------------------------------------
// Initialize/Finalize
//------------------------------------------------------------------
bool TitleDownloaderTest::InitializeSuite()
{
// os の初期化
nn::os::Initialize();
nn::fs::Initialize();
// amの初期化
nn::am::InitializeForSystemMenu();
// ヒープの確保
common::HeapManager::GetHeap()->Initialize(nn::os::GetDeviceMemoryAddress(), nn::os::GetDeviceMemorySize(), nn::os::ALLOCATE_OPTION_LINEAR);
// RenderSystem の準備
uptr heapForGx = reinterpret_cast<uptr>(common::HeapManager::GetHeap()->Allocate(s_GxHeapSize));
demo::RenderSystemDrawing renderSystem;
renderSystem.Initialize(heapForGx, s_GxHeapSize);
// ログ描画の初期化
common::Logger::GetLoggerInstance()->Initialize(common::CONSOLE_WIDTH, common::CONSOLE_HEIGHT,
common::CONSOLE_MAX_LINE, &renderSystem);
return true;
}
void TitleDownloaderTest::FinalizeSuite()
{
}
//------------------------------------------------------------------
// Test Util
//------------------------------------------------------------------
//------------------------------------------------------------------
// Test Functions
//------------------------------------------------------------------
void TitleDownloaderTest::ListUp()
{
NN_LOG("WriteTwlTitleData\n");
ConsoleRestore::TitleDownloader dl;
dl.Start();
}
NN_TEST_DEFINE_MAIN(TitleDownloaderTest)
/*---------------------------------------------------------------------------*
End of file
*---------------------------------------------------------------------------*/