Просмотр исходного кода

arm_test_common: Make file static variable a member variable of the testing environment

Gets rid of file-static behavior.
Lioncash 8 лет назад
Родитель
Сommit
a8bb1eb39f
2 измененных файлов с 5 добавлено и 2 удалено
  1. 0 2
      src/tests/core/arm/arm_test_common.cpp
  2. 5 0
      src/tests/core/arm/arm_test_common.h

+ 0 - 2
src/tests/core/arm/arm_test_common.cpp

@@ -10,8 +10,6 @@
 
 
 namespace ArmTests {
 namespace ArmTests {
 
 
-static Memory::PageTable* page_table = nullptr;
-
 TestEnvironment::TestEnvironment(bool mutable_memory_)
 TestEnvironment::TestEnvironment(bool mutable_memory_)
     : mutable_memory(mutable_memory_), test_memory(std::make_shared<TestMemory>(this)) {
     : mutable_memory(mutable_memory_), test_memory(std::make_shared<TestMemory>(this)) {
 
 

+ 5 - 0
src/tests/core/arm/arm_test_common.h

@@ -11,6 +11,10 @@
 #include "common/common_types.h"
 #include "common/common_types.h"
 #include "core/memory_hook.h"
 #include "core/memory_hook.h"
 
 
+namespace Memory {
+struct PageTable;
+}
+
 namespace ArmTests {
 namespace ArmTests {
 
 
 struct WriteRecord {
 struct WriteRecord {
@@ -81,6 +85,7 @@ private:
     bool mutable_memory;
     bool mutable_memory;
     std::shared_ptr<TestMemory> test_memory;
     std::shared_ptr<TestMemory> test_memory;
     std::vector<WriteRecord> write_records;
     std::vector<WriteRecord> write_records;
+    Memory::PageTable* page_table = nullptr;
 };
 };
 
 
 } // namespace ArmTests
 } // namespace ArmTests