mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-15 13:31:40 +00:00
UnitTests/Core: Make parameters constant
This commit is contained in:
parent
c211efd84a
commit
7de18efc93
3 changed files with 20 additions and 18 deletions
|
@ -120,16 +120,17 @@ TEST_F(MappingTest, ReadWriteComplex)
|
|||
{
|
||||
bool read_called = false, write_called = false;
|
||||
|
||||
m_mapping->Register(0x0C001234, MMIO::ComplexRead<u8>([&read_called](Core::System&, u32 addr) {
|
||||
EXPECT_EQ(0x0C001234u, addr);
|
||||
read_called = true;
|
||||
return 0x12;
|
||||
}),
|
||||
MMIO::ComplexWrite<u8>([&write_called](Core::System&, u32 addr, u8 val) {
|
||||
EXPECT_EQ(0x0C001234u, addr);
|
||||
EXPECT_EQ(0x34, val);
|
||||
write_called = true;
|
||||
}));
|
||||
m_mapping->Register(
|
||||
0x0C001234, MMIO::ComplexRead<u8>([&read_called](Core::System&, const u32 addr) {
|
||||
EXPECT_EQ(0x0C001234u, addr);
|
||||
read_called = true;
|
||||
return 0x12;
|
||||
}),
|
||||
MMIO::ComplexWrite<u8>([&write_called](Core::System&, const u32 addr, const u8 val) {
|
||||
EXPECT_EQ(0x0C001234u, addr);
|
||||
EXPECT_EQ(0x34, val);
|
||||
write_called = true;
|
||||
}));
|
||||
|
||||
u8 val = m_mapping->Read<u8>(*m_system, 0x0C001234);
|
||||
EXPECT_EQ(0x12, val);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue