1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-07-24 01:15:29 +02:00

debug tests: Use SyncUtil's memory functions in MIMemoryTest

Change-Id: I47b9e4e65d418743da97bfddb78bfdce29f3c688
Signed-off-by: Simon Marchi <simon.marchi@polymtl.ca>
This commit is contained in:
Simon Marchi 2015-01-24 00:29:02 -05:00 committed by Marc Khouzam
parent e11bdc4502
commit 9ae9ed49f6

View file

@ -1103,7 +1103,7 @@ public class MIMemoryTest extends BaseTestCase {
for (int i = 0; i < (count * length); i++)
assertTrue("Wrong value read at offset " + i + ": expected '" + 0 + "', received '" + block[i].getValue() + "'",
(block[i].getValue() == (byte) 0));
for (int i = 0; i < BLOCK_SIZE; i += length) {
IAddress address = fBaseAddress.add(i);
SyncUtil.fillMemory(fMemoryDmc, address, offset, word_size, count, pattern);
@ -1148,11 +1148,11 @@ public class MIMemoryTest extends BaseTestCase {
fBaseAddress = evaluateExpression(frameDmc, "&charBlock");
// Ensure that the memory is zeroed
MemoryByte[] block = SyncUtil.readMemory(fMemoryDmc, fBaseAddress, offset, word_size, count * length);;
MemoryByte[] block = SyncUtil.readMemory(fMemoryDmc, fBaseAddress, offset, word_size, count * length);
for (int i = 0; i < (count * length); i++)
assertTrue("Wrong value read at offset " + i + ": expected '" + 0 + "', received '" + block[i].getValue() + "'",
(block[i].getValue() == (byte) 0));
for (int i = 0; i < (BLOCK_SIZE / length); i++) {
offset = i * length;
SyncUtil.fillMemory(fMemoryDmc, fBaseAddress, offset, word_size, 1, pattern);