diff --git a/trunk/ConsoleDataMigration/sources/tests/ConsoleBackup/Exporter/OMakefile b/trunk/ConsoleDataMigration/sources/tests/ConsoleBackup/Exporter/OMakefile index ffa784f..ef5f9f7 100644 --- a/trunk/ConsoleDataMigration/sources/tests/ConsoleBackup/Exporter/OMakefile +++ b/trunk/ConsoleDataMigration/sources/tests/ConsoleBackup/Exporter/OMakefile @@ -50,6 +50,7 @@ LIBS += libnn_test \ libnn_mcu \ libnn_ps \ libnn_am \ + lib_demo \ ROM_SPEC_FILE = ../../../ConsoleBackup/ConsoleBackup.rsf diff --git a/trunk/ConsoleDataMigration/sources/tests/ConsoleBackup/Exporter/test_Exporter.cpp b/trunk/ConsoleDataMigration/sources/tests/ConsoleBackup/Exporter/test_Exporter.cpp new file mode 100644 index 0000000..2c2aa79 --- /dev/null +++ b/trunk/ConsoleDataMigration/sources/tests/ConsoleBackup/Exporter/test_Exporter.cpp @@ -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 +#include +#include +#include +#include +#include +#include +#include + +#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(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 + *---------------------------------------------------------------------------*/ diff --git a/trunk/ConsoleDataMigration/sources/tests/ConsoleBackup/OMakefile b/trunk/ConsoleDataMigration/sources/tests/ConsoleBackup/OMakefile new file mode 100644 index 0000000..0b7f26b --- /dev/null +++ b/trunk/ConsoleDataMigration/sources/tests/ConsoleBackup/OMakefile @@ -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()