mirror of
https://github.com/NationalSecurityAgency/ghidra.git
synced 2024-11-22 20:22:44 +00:00
Fix tests that relied on string format of hex values
This commit is contained in:
parent
fe8d863c47
commit
871862dbe1
@ -818,7 +818,7 @@ public class DataAction4Test extends AbstractDataActionTest {
|
|||||||
|
|
||||||
d = getContextData();
|
d = getContextData();
|
||||||
assertEquals("ChooseFontW\0\u0015\0ReplaceTextW\0\0\u0004", d.getValue());
|
assertEquals("ChooseFontW\0\u0015\0ReplaceTextW\0\0\u0004", d.getValue());
|
||||||
assertEquals("\"ChooseFontW\\0\",15,\"\\0ReplaceTextW\\0\\0\",04",
|
assertEquals("\"ChooseFontW\\0\",15h,\"\\0ReplaceTextW\\0\\0\",04h",
|
||||||
d.getDefaultValueRepresentation());
|
d.getDefaultValueRepresentation());
|
||||||
|
|
||||||
}
|
}
|
||||||
@ -851,7 +851,7 @@ public class DataAction4Test extends AbstractDataActionTest {
|
|||||||
assertEquals("\"ChooseFontW\"", d.getDefaultValueRepresentation());
|
assertEquals("\"ChooseFontW\"", d.getDefaultValueRepresentation());
|
||||||
|
|
||||||
d = checkNextData(dit, TerminatedStringDataType.class, 0x01006a0e, 2);
|
d = checkNextData(dit, TerminatedStringDataType.class, 0x01006a0e, 2);
|
||||||
assertEquals("15", d.getDefaultValueRepresentation());
|
assertEquals("15h", d.getDefaultValueRepresentation());
|
||||||
|
|
||||||
d = checkNextData(dit, TerminatedStringDataType.class, 0x01006a10, 13);
|
d = checkNextData(dit, TerminatedStringDataType.class, 0x01006a10, 13);
|
||||||
assertEquals("ReplaceTextW", d.getValue());
|
assertEquals("ReplaceTextW", d.getValue());
|
||||||
@ -862,7 +862,7 @@ public class DataAction4Test extends AbstractDataActionTest {
|
|||||||
assertEquals("\"\"", d.getDefaultValueRepresentation());
|
assertEquals("\"\"", d.getDefaultValueRepresentation());
|
||||||
|
|
||||||
d = checkNextData(dit, TerminatedStringDataType.class, 0x01006a1e, 2);
|
d = checkNextData(dit, TerminatedStringDataType.class, 0x01006a1e, 2);
|
||||||
assertEquals("04", d.getDefaultValueRepresentation());
|
assertEquals("04h", d.getDefaultValueRepresentation());
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@ -890,7 +890,7 @@ public class DataAction4Test extends AbstractDataActionTest {
|
|||||||
checkOnDefined(null, UnicodeDataType.class);
|
checkOnDefined(null, UnicodeDataType.class);
|
||||||
|
|
||||||
d = getContextData();
|
d = getContextData();
|
||||||
assertEquals("01,00,\"\\0Sample\"", d.getDefaultValueRepresentation());
|
assertEquals("01h,00h,\"\\0Sample\"", d.getDefaultValueRepresentation());
|
||||||
assertEquals("\1\0Sample", d.getValue());
|
assertEquals("\1\0Sample", d.getValue());
|
||||||
|
|
||||||
}
|
}
|
||||||
@ -925,7 +925,7 @@ public class DataAction4Test extends AbstractDataActionTest {
|
|||||||
// check for wchar16[2] garbage string
|
// check for wchar16[2] garbage string
|
||||||
d = checkNextData(dit, TerminatedUnicodeDataType.class, 0x01008014, 4);
|
d = checkNextData(dit, TerminatedUnicodeDataType.class, 0x01008014, 4);
|
||||||
assertEquals(d.getLength(), 4);
|
assertEquals(d.getLength(), 4);
|
||||||
assertEquals("01,00", d.getDefaultValueRepresentation());
|
assertEquals("01h,00h", d.getDefaultValueRepresentation());
|
||||||
assertEquals("\1", d.getValue());
|
assertEquals("\1", d.getValue());
|
||||||
|
|
||||||
// check for "Sample" string
|
// check for "Sample" string
|
||||||
|
@ -1175,7 +1175,7 @@ public class EquatePlugin1Test extends AbstractEquatePluginTest {
|
|||||||
performAction("Convert To Char");
|
performAction("Convert To Char");
|
||||||
|
|
||||||
ListingTextField tf = (ListingTextField) cb.getCurrentField();
|
ListingTextField tf = (ListingTextField) cb.getCurrentField();
|
||||||
assertEquals("'\\x02'", tf.getFieldElement(0, 11).getText());
|
assertEquals("02h", tf.getFieldElement(0, 11).getText());
|
||||||
|
|
||||||
undo(program);
|
undo(program);
|
||||||
tf = (ListingTextField) cb.getCurrentField();
|
tf = (ListingTextField) cb.getCurrentField();
|
||||||
@ -1184,7 +1184,7 @@ public class EquatePlugin1Test extends AbstractEquatePluginTest {
|
|||||||
|
|
||||||
redo(program);
|
redo(program);
|
||||||
tf = (ListingTextField) cb.getCurrentField();
|
tf = (ListingTextField) cb.getCurrentField();
|
||||||
assertEquals("'\\x02'", tf.getFieldElement(0, 11).getText());
|
assertEquals("02h", tf.getFieldElement(0, 11).getText());
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
|
Loading…
Reference in New Issue
Block a user