mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-04-29 19:45:01 +02:00
Bug 387793: Fix JUnit tests for new -data-write-memory-bytes
This commit is contained in:
parent
4de3c2e62c
commit
00a88f7394
1 changed files with 8 additions and 3 deletions
|
@ -1153,9 +1153,14 @@ public class MIMemoryTest extends BaseTestCase {
|
||||||
fillMemory(fMemoryDmc, fBaseAddress, offset, word_size, count, pattern);
|
fillMemory(fMemoryDmc, fBaseAddress, offset, word_size, count, pattern);
|
||||||
fWait.waitUntilDone(AsyncCompletionWaitor.WAIT_FOREVER);
|
fWait.waitUntilDone(AsyncCompletionWaitor.WAIT_FOREVER);
|
||||||
assertFalse(fWait.getMessage(), fWait.isOK());
|
assertFalse(fWait.getMessage(), fWait.isOK());
|
||||||
String expected = "Cannot access memory at address"; // Error msg returned by gdb
|
|
||||||
assertTrue("Wrong error message: expected '" + expected + "', received '" + fWait.getMessage() + "'",
|
// Depending on the GDB, a different command can be used. Both error message are valid.
|
||||||
fWait.getMessage().contains(expected));
|
// Error message for -data-write-memory command
|
||||||
|
String expected = "Cannot access memory at address";
|
||||||
|
// Error message for new -data-write-memory-bytes command
|
||||||
|
String expected2 = "Could not write memory";
|
||||||
|
assertTrue("Wrong error message: expected '" + expected + ", or '" + expected2 + "', received '" + fWait.getMessage() + "'",
|
||||||
|
fWait.getMessage().contains(expected) || fWait.getMessage().contains(expected2));
|
||||||
|
|
||||||
// Ensure no MemoryChangedEvent event was received
|
// Ensure no MemoryChangedEvent event was received
|
||||||
assertTrue("MemoryChangedEvent problem: expected " + 0 + ", received " + getEventCount(), getEventCount() == 0);
|
assertTrue("MemoryChangedEvent problem: expected " + 0 + ", received " + getEventCount(), getEventCount() == 0);
|
||||||
|
|
Loading…
Add table
Reference in a new issue