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

Utility class for handling test ROM files. More...

#include <test_utils.h>

Classes

class  BoundRomTest
 

Static Public Member Functions

static bool IsRomTestingEnabled ()
 Check if ROM testing is enabled and ROM file exists.
 
static std::string GetTestRomPath ()
 Get the path to the test ROM file.
 
static std::vector< uint8_t > LoadTestRom ()
 Load the test ROM file into memory.
 
static std::vector< uint8_t > CreateMinimalTestRom (size_t size=1024 *1024)
 Create a minimal test ROM for unit testing.
 
static void SkipIfRomTestingDisabled (const std::string &test_name)
 Skip test if ROM testing is not enabled.
 

Detailed Description

Utility class for handling test ROM files.

Definition at line 27 of file test_utils.h.

Member Function Documentation

◆ IsRomTestingEnabled()

static bool yaze::test::TestRomManager::IsRomTestingEnabled ( )
inlinestatic

Check if ROM testing is enabled and ROM file exists.

Returns
True if ROM tests can be run

Definition at line 35 of file test_utils.h.

References GetTestRomPath().

Referenced by LoadTestRom(), and SkipIfRomTestingDisabled().

Here is the call graph for this function:

◆ GetTestRomPath()

static std::string yaze::test::TestRomManager::GetTestRomPath ( )
inlinestatic

◆ LoadTestRom()

static std::vector< uint8_t > yaze::test::TestRomManager::LoadTestRom ( )
inlinestatic

Load the test ROM file into memory.

Returns
Vector containing ROM data, or empty if failed

Definition at line 59 of file test_utils.h.

References GetTestRomPath(), and IsRomTestingEnabled().

Referenced by yaze::test::RomDependentTest::SetUp().

Here is the call graph for this function:

◆ CreateMinimalTestRom()

static std::vector< uint8_t > yaze::test::TestRomManager::CreateMinimalTestRom ( size_t  size = 1024 * 1024)
inlinestatic

Create a minimal test ROM for unit testing.

Parameters
sizeSize of the ROM in bytes
Returns
Vector containing minimal ROM data

Definition at line 93 of file test_utils.h.

◆ SkipIfRomTestingDisabled()

static void yaze::test::TestRomManager::SkipIfRomTestingDisabled ( const std::string &  test_name)
inlinestatic

Skip test if ROM testing is not enabled.

Parameters
test_nameName of the test for logging

Definition at line 131 of file test_utils.h.

References GetTestRomPath(), and IsRomTestingEnabled().

Referenced by yaze::test::RomDependentTest::SetUp().

Here is the call graph for this function:

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