mirror of
https://github.com/NationalSecurityAgency/ghidra.git
synced 2025-10-04 18:29:37 +02:00
GT-3512 refactor tests to use bytes() helper method, javadoc.
Allows getting rid of out-of-place ByteMemBufferImpl ctor. Fix javadoc
This commit is contained in:
parent
b6bea0fb39
commit
e4372a30f1
15 changed files with 92 additions and 95 deletions
|
@ -15,21 +15,19 @@
|
|||
*/
|
||||
package ghidra.program.model.data;
|
||||
|
||||
import static org.junit.Assert.assertEquals;
|
||||
import static org.junit.Assert.*;
|
||||
|
||||
import org.junit.Test;
|
||||
|
||||
import generic.test.AbstractGTest;
|
||||
import ghidra.program.model.mem.ByteMemBufferImpl;
|
||||
import ghidra.util.LittleEndianDataConverter;
|
||||
|
||||
public class FloatDataTypeTest extends AbstractGTest {
|
||||
|
||||
private byte[] getBytes(long value, int size) {
|
||||
byte[] bytes = new byte[size];
|
||||
for (int i = 0; i < size; i++) {
|
||||
bytes[i] = (byte) value;
|
||||
value >>= 8;
|
||||
}
|
||||
LittleEndianDataConverter.INSTANCE.getBytes(value, size, bytes, 0);
|
||||
return bytes;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue