ARM: pass MemorySystem separately in the constructor and make System optional
So that unit test can test CPU without constructing the entire system. Also remove hacks in the System class
This commit is contained in:
@@ -21,10 +21,9 @@ static SharedPtr<Object> MakeObject(Kernel::KernelSystem& kernel) {
|
||||
}
|
||||
|
||||
TEST_CASE("HLERequestContext::PopulateFromIncomingCommandBuffer", "[core][kernel]") {
|
||||
// HACK: see comments of member timing
|
||||
Core::System::GetInstance().timing = std::make_unique<Core::Timing>();
|
||||
auto memory = std::make_unique<Memory::MemorySystem>();
|
||||
Kernel::KernelSystem kernel(*memory, *Core::System::GetInstance().timing, [] {}, 0);
|
||||
Core::Timing timing;
|
||||
Memory::MemorySystem memory;
|
||||
Kernel::KernelSystem kernel(memory, timing, [] {}, 0);
|
||||
auto session = std::get<SharedPtr<ServerSession>>(kernel.CreateSessionPair());
|
||||
HLERequestContext context(std::move(session));
|
||||
|
||||
@@ -234,10 +233,9 @@ TEST_CASE("HLERequestContext::PopulateFromIncomingCommandBuffer", "[core][kernel
|
||||
}
|
||||
|
||||
TEST_CASE("HLERequestContext::WriteToOutgoingCommandBuffer", "[core][kernel]") {
|
||||
// HACK: see comments of member timing
|
||||
Core::System::GetInstance().timing = std::make_unique<Core::Timing>();
|
||||
auto memory = std::make_unique<Memory::MemorySystem>();
|
||||
Kernel::KernelSystem kernel(*memory, *Core::System::GetInstance().timing, [] {}, 0);
|
||||
Core::Timing timing;
|
||||
Memory::MemorySystem memory;
|
||||
Kernel::KernelSystem kernel(memory, timing, [] {}, 0);
|
||||
auto session = std::get<SharedPtr<ServerSession>>(kernel.CreateSessionPair());
|
||||
HLERequestContext context(std::move(session));
|
||||
|
||||
|
Reference in New Issue
Block a user