From 4d10a2d652fea69662994afc51a6147c46978838 Mon Sep 17 00:00:00 2001 From: Weiyi Wang Date: Thu, 14 Feb 2019 14:08:45 -0500 Subject: [PATCH] tests/audio_core: remove hack for system objects --- src/tests/audio_core/decoder_tests.cpp | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/src/tests/audio_core/decoder_tests.cpp b/src/tests/audio_core/decoder_tests.cpp index d8f31127d2..0e45b5b7d1 100644 --- a/src/tests/audio_core/decoder_tests.cpp +++ b/src/tests/audio_core/decoder_tests.cpp @@ -20,17 +20,13 @@ #include "audio_fixures.h" TEST_CASE("DSP HLE Audio Decoder", "[audio_core]") { - // HACK: see comments of member timing - Core::System::GetInstance().timing = std::make_unique(); - Core::System::GetInstance().memory = std::make_unique(); - Kernel::KernelSystem kernel(*Core::System::GetInstance().memory, 0); + Memory::MemorySystem memory; SECTION("decoder should produce correct samples") { - auto process = kernel.CreateProcess(kernel.CreateCodeSet("", 0)); auto decoder = #ifdef HAVE_MF - std::make_unique(*Core::System::GetInstance().memory); + std::make_unique(memory); #elif HAVE_FFMPEG - std::make_unique(*Core::System::GetInstance().memory); + std::make_unique(memory); #endif AudioCore::HLE::BinaryRequest request; @@ -40,7 +36,7 @@ TEST_CASE("DSP HLE Audio Decoder", "[audio_core]") { std::optional response = decoder->ProcessRequest(request); request.cmd = AudioCore::HLE::DecoderCommand::Decode; - u8* fcram = Core::System::GetInstance().memory->GetFCRAMPointer(0); + u8* fcram = memory.GetFCRAMPointer(0); memcpy(fcram, fixure_buffer, fixure_buffer_size); request.src_addr = Memory::FCRAM_PADDR;