追加忘れ

git-svn-id: file:///Volumes/Transfer/gigaleak_20231201/2020-05-23%20-%20ctr.7z%20+%20svn_v1.068.zip/ctr/svn/ctr_Repair@229 385bec56-5757-e545-9c3a-d8741f4650f1
This commit is contained in:
N2614 2011-04-27 02:45:13 +00:00
parent 08d2943d3e
commit fac5744ca6
3 changed files with 128 additions and 0 deletions

View File

@ -50,6 +50,7 @@ LIBS += libnn_test \
libnn_mcu \
libnn_ps \
libnn_am \
lib_demo \
ROM_SPEC_FILE = ../../../ConsoleBackup/ConsoleBackup.rsf

View File

@ -0,0 +1,107 @@
/*---------------------------------------------------------------------------*
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 "CommonLogger.h"
#include "HeapManager.h"
#include "Exporter.h"
using namespace nn::test;
class ExporterTest : public Suite {
public:
virtual bool InitializeSuite();
virtual void FinalizeSuite();
ExporterTest() {
SUITE_NAME("TestUtil");
TEST_ADD(ExporterTest::WriteTwlTitleData);
}
private:
void WriteTwlTitleData();
};
namespace
{
const size_t s_GxHeapSize = 0x800000;
}
//------------------------------------------------------------------
// Initialize/Finalize
//------------------------------------------------------------------
bool ExporterTest::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 ExporterTest::FinalizeSuite()
{
}
//------------------------------------------------------------------
// Test Util
//------------------------------------------------------------------
//------------------------------------------------------------------
// Test Functions
//------------------------------------------------------------------
void ExporterTest::WriteTwlTitleData()
{
NN_LOG("WriteTwlTitleData\n");
ConsoleBackup::ExportTwlTitleList();
}
NN_TEST_DEFINE_MAIN(ExporterTest)
/*---------------------------------------------------------------------------*
End of file
*---------------------------------------------------------------------------*/

View File

@ -0,0 +1,20 @@
#!/usr/bin/env omake
#----------------------------------------------------------------------------
# Project: Horizon
# File: OMakefile
#
# Copyright (C)2009 Nintendo Co., Ltd. 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$
#----------------------------------------------------------------------------
if $(IsTestBuild)
.SUBDIRS: Exporter
DefineDefaultRules()