summaryrefslogtreecommitdiffstats
path: root/src/tests/core/arm
diff options
context:
space:
mode:
authorfearlessTobi <thm.frey@gmail.com>2018-09-15 15:21:06 +0200
committerfearlessTobi <thm.frey@gmail.com>2018-09-15 15:21:06 +0200
commit63c2e32e207d31ecadd9022e1d7cd705c9febac8 (patch)
tree8a90e8ef2804f147dff7225a543a8740ecf7160c /src/tests/core/arm
parentMerge pull request #1310 from lioncash/kernel-ns (diff)
downloadyuzu-63c2e32e207d31ecadd9022e1d7cd705c9febac8.tar
yuzu-63c2e32e207d31ecadd9022e1d7cd705c9febac8.tar.gz
yuzu-63c2e32e207d31ecadd9022e1d7cd705c9febac8.tar.bz2
yuzu-63c2e32e207d31ecadd9022e1d7cd705c9febac8.tar.lz
yuzu-63c2e32e207d31ecadd9022e1d7cd705c9febac8.tar.xz
yuzu-63c2e32e207d31ecadd9022e1d7cd705c9febac8.tar.zst
yuzu-63c2e32e207d31ecadd9022e1d7cd705c9febac8.zip
Diffstat (limited to 'src/tests/core/arm')
-rw-r--r--src/tests/core/arm/arm_test_common.cpp9
-rw-r--r--src/tests/core/arm/arm_test_common.h8
2 files changed, 9 insertions, 8 deletions
diff --git a/src/tests/core/arm/arm_test_common.cpp b/src/tests/core/arm/arm_test_common.cpp
index 038d57b3a..7c69fc26e 100644
--- a/src/tests/core/arm/arm_test_common.cpp
+++ b/src/tests/core/arm/arm_test_common.cpp
@@ -87,11 +87,11 @@ boost::optional<u64> TestEnvironment::TestMemory::Read64(VAddr addr) {
return *Read32(addr) | static_cast<u64>(*Read32(addr + 4)) << 32;
}
-bool TestEnvironment::TestMemory::ReadBlock(VAddr src_addr, void* dest_buffer, size_t size) {
+bool TestEnvironment::TestMemory::ReadBlock(VAddr src_addr, void* dest_buffer, std::size_t size) {
VAddr addr = src_addr;
u8* data = static_cast<u8*>(dest_buffer);
- for (size_t i = 0; i < size; i++, addr++, data++) {
+ for (std::size_t i = 0; i < size; i++, addr++, data++) {
*data = *Read8(addr);
}
@@ -126,11 +126,12 @@ bool TestEnvironment::TestMemory::Write64(VAddr addr, u64 data) {
return true;
}
-bool TestEnvironment::TestMemory::WriteBlock(VAddr dest_addr, const void* src_buffer, size_t size) {
+bool TestEnvironment::TestMemory::WriteBlock(VAddr dest_addr, const void* src_buffer,
+ std::size_t size) {
VAddr addr = dest_addr;
const u8* data = static_cast<const u8*>(src_buffer);
- for (size_t i = 0; i < size; i++, addr++, data++) {
+ for (std::size_t i = 0; i < size; i++, addr++, data++) {
env->write_records.emplace_back(8, addr, *data);
if (env->mutable_memory)
env->SetMemory8(addr, *data);
diff --git a/src/tests/core/arm/arm_test_common.h b/src/tests/core/arm/arm_test_common.h
index e4b6df194..5de8dab4e 100644
--- a/src/tests/core/arm/arm_test_common.h
+++ b/src/tests/core/arm/arm_test_common.h
@@ -19,8 +19,8 @@ struct PageTable;
namespace ArmTests {
struct WriteRecord {
- WriteRecord(size_t size, VAddr addr, u64 data) : size(size), addr(addr), data(data) {}
- size_t size;
+ WriteRecord(std::size_t size, VAddr addr, u64 data) : size(size), addr(addr), data(data) {}
+ std::size_t size;
VAddr addr;
u64 data;
bool operator==(const WriteRecord& o) const {
@@ -71,14 +71,14 @@ private:
boost::optional<u32> Read32(VAddr addr) override;
boost::optional<u64> Read64(VAddr addr) override;
- bool ReadBlock(VAddr src_addr, void* dest_buffer, size_t size) override;
+ bool ReadBlock(VAddr src_addr, void* dest_buffer, std::size_t size) override;
bool Write8(VAddr addr, u8 data) override;
bool Write16(VAddr addr, u16 data) override;
bool Write32(VAddr addr, u32 data) override;
bool Write64(VAddr addr, u64 data) override;
- bool WriteBlock(VAddr dest_addr, const void* src_buffer, size_t size) override;
+ bool WriteBlock(VAddr dest_addr, const void* src_buffer, std::size_t size) override;
std::unordered_map<VAddr, u8> data;
};