mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-07-31 04:45:38 +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:
parent
e11bdc4502
commit
9ae9ed49f6
1 changed files with 3 additions and 3 deletions
|
@ -1103,7 +1103,7 @@ public class MIMemoryTest extends BaseTestCase {
|
||||||
for (int i = 0; i < (count * length); i++)
|
for (int i = 0; i < (count * length); i++)
|
||||||
assertTrue("Wrong value read at offset " + i + ": expected '" + 0 + "', received '" + block[i].getValue() + "'",
|
assertTrue("Wrong value read at offset " + i + ": expected '" + 0 + "', received '" + block[i].getValue() + "'",
|
||||||
(block[i].getValue() == (byte) 0));
|
(block[i].getValue() == (byte) 0));
|
||||||
|
|
||||||
for (int i = 0; i < BLOCK_SIZE; i += length) {
|
for (int i = 0; i < BLOCK_SIZE; i += length) {
|
||||||
IAddress address = fBaseAddress.add(i);
|
IAddress address = fBaseAddress.add(i);
|
||||||
SyncUtil.fillMemory(fMemoryDmc, address, offset, word_size, count, pattern);
|
SyncUtil.fillMemory(fMemoryDmc, address, offset, word_size, count, pattern);
|
||||||
|
@ -1148,11 +1148,11 @@ public class MIMemoryTest extends BaseTestCase {
|
||||||
fBaseAddress = evaluateExpression(frameDmc, "&charBlock");
|
fBaseAddress = evaluateExpression(frameDmc, "&charBlock");
|
||||||
|
|
||||||
// Ensure that the memory is zeroed
|
// 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++)
|
for (int i = 0; i < (count * length); i++)
|
||||||
assertTrue("Wrong value read at offset " + i + ": expected '" + 0 + "', received '" + block[i].getValue() + "'",
|
assertTrue("Wrong value read at offset " + i + ": expected '" + 0 + "', received '" + block[i].getValue() + "'",
|
||||||
(block[i].getValue() == (byte) 0));
|
(block[i].getValue() == (byte) 0));
|
||||||
|
|
||||||
for (int i = 0; i < (BLOCK_SIZE / length); i++) {
|
for (int i = 0; i < (BLOCK_SIZE / length); i++) {
|
||||||
offset = i * length;
|
offset = i * length;
|
||||||
SyncUtil.fillMemory(fMemoryDmc, fBaseAddress, offset, word_size, 1, pattern);
|
SyncUtil.fillMemory(fMemoryDmc, fBaseAddress, offset, word_size, 1, pattern);
|
||||||
|
|
Loading…
Add table
Reference in a new issue