yaze 0.3.2
Link to the Past ROM Editor
 
Loading...
Searching...
No Matches
yaze::test::ZSCustomOverworldUpgradeTest Class Reference

ZSCustomOverworld upgrade testing suite. More...

Inheritance diagram for yaze::test::ZSCustomOverworldUpgradeTest:
Collaboration diagram for yaze::test::ZSCustomOverworldUpgradeTest:

Protected Member Functions

void SetUp () override
 
void TearDown () override
 
void InitializeVersionData ()
 
absl::Status ApplyVersionPatch (Rom &rom, const std::string &version)
 
bool ValidateVersionAddresses (Rom &rom, const std::string &version)
 

Protected Attributes

std::string vanilla_rom_path_
 
std::string vanilla_test_path_
 
std::string v2_test_path_
 
std::string v3_test_path_
 
std::map< std::string, std::pair< uint32_t, uint8_t > > vanilla_data_
 
std::map< std::string, std::pair< uint32_t, uint8_t > > v2_data_
 
std::map< std::string, std::pair< uint32_t, uint8_t > > v3_data_
 

Detailed Description

ZSCustomOverworld upgrade testing suite.

This test suite validates ZSCustomOverworld version upgrades:

  1. Vanilla -> v2 upgrade with proper address changes
  2. v2 -> v3 upgrade with expanded features
  3. Address validation for each version
  4. Save compatibility between versions
  5. Feature enablement/disablement

Definition at line 24 of file zscustomoverworld_upgrade_test.cc.

Member Function Documentation

◆ SetUp()

void yaze::test::ZSCustomOverworldUpgradeTest::SetUp ( )
inlineoverrideprotected

Definition at line 26 of file zscustomoverworld_upgrade_test.cc.

References InitializeVersionData(), v2_test_path_, v3_test_path_, vanilla_rom_path_, and vanilla_test_path_.

Here is the call graph for this function:

◆ TearDown()

void yaze::test::ZSCustomOverworldUpgradeTest::TearDown ( )
inlineoverrideprotected

◆ InitializeVersionData()

void yaze::test::ZSCustomOverworldUpgradeTest::InitializeVersionData ( )
inlineprotected

Definition at line 65 of file zscustomoverworld_upgrade_test.cc.

References v2_data_, v3_data_, and vanilla_data_.

Referenced by SetUp().

◆ ApplyVersionPatch()

absl::Status yaze::test::ZSCustomOverworldUpgradeTest::ApplyVersionPatch ( Rom rom,
const std::string &  version 
)
inlineprotected

Definition at line 107 of file zscustomoverworld_upgrade_test.cc.

References RETURN_IF_ERROR, v2_data_, v3_data_, vanilla_data_, and yaze::Rom::WriteByte().

Here is the call graph for this function:

◆ ValidateVersionAddresses()

bool yaze::test::ZSCustomOverworldUpgradeTest::ValidateVersionAddresses ( Rom rom,
const std::string &  version 
)
inlineprotected

Definition at line 138 of file zscustomoverworld_upgrade_test.cc.

References yaze::Rom::ReadByte(), v2_data_, v3_data_, and vanilla_data_.

Here is the call graph for this function:

Member Data Documentation

◆ vanilla_rom_path_

std::string yaze::test::ZSCustomOverworldUpgradeTest::vanilla_rom_path_
protected

Definition at line 156 of file zscustomoverworld_upgrade_test.cc.

Referenced by SetUp().

◆ vanilla_test_path_

std::string yaze::test::ZSCustomOverworldUpgradeTest::vanilla_test_path_
protected

Definition at line 157 of file zscustomoverworld_upgrade_test.cc.

Referenced by SetUp(), and TearDown().

◆ v2_test_path_

std::string yaze::test::ZSCustomOverworldUpgradeTest::v2_test_path_
protected

Definition at line 158 of file zscustomoverworld_upgrade_test.cc.

Referenced by SetUp(), and TearDown().

◆ v3_test_path_

std::string yaze::test::ZSCustomOverworldUpgradeTest::v3_test_path_
protected

Definition at line 159 of file zscustomoverworld_upgrade_test.cc.

Referenced by SetUp(), and TearDown().

◆ vanilla_data_

std::map<std::string, std::pair<uint32_t, uint8_t> > yaze::test::ZSCustomOverworldUpgradeTest::vanilla_data_
protected

◆ v2_data_

std::map<std::string, std::pair<uint32_t, uint8_t> > yaze::test::ZSCustomOverworldUpgradeTest::v2_data_
protected

◆ v3_data_

std::map<std::string, std::pair<uint32_t, uint8_t> > yaze::test::ZSCustomOverworldUpgradeTest::v3_data_
protected

The documentation for this class was generated from the following file: