fix: add missing assertNotNull import and byte cast in ExecutableDetectorTest
Build & Deploy / build-and-deploy (push) Failing after 41s
Build & Deploy / build-and-deploy (push) Failing after 41s
This commit is contained in:
@@ -9,6 +9,7 @@ import java.util.List;
|
|||||||
|
|
||||||
import static org.junit.jupiter.api.Assertions.assertEquals;
|
import static org.junit.jupiter.api.Assertions.assertEquals;
|
||||||
import static org.junit.jupiter.api.Assertions.assertFalse;
|
import static org.junit.jupiter.api.Assertions.assertFalse;
|
||||||
|
import static org.junit.jupiter.api.Assertions.assertNotNull;
|
||||||
import static org.junit.jupiter.api.Assertions.assertNull;
|
import static org.junit.jupiter.api.Assertions.assertNull;
|
||||||
import static org.junit.jupiter.api.Assertions.assertTrue;
|
import static org.junit.jupiter.api.Assertions.assertTrue;
|
||||||
|
|
||||||
@@ -141,7 +142,7 @@ class ExecutableDetectorTest {
|
|||||||
// Windows PE executable: MZ header + PE signature at offset 0x80
|
// Windows PE executable: MZ header + PE signature at offset 0x80
|
||||||
byte[] windowsExe = new byte[0x100];
|
byte[] windowsExe = new byte[0x100];
|
||||||
windowsExe[0] = 0x4D; windowsExe[1] = 0x5A; // MZ
|
windowsExe[0] = 0x4D; windowsExe[1] = 0x5A; // MZ
|
||||||
windowsExe[0x3C] = 0x80; // PE offset at 0x80
|
windowsExe[0x3C] = (byte) 0x80; // PE offset at 0x80
|
||||||
windowsExe[0x80] = 0x50; windowsExe[0x81] = 0x45; // "PE" signature
|
windowsExe[0x80] = 0x50; windowsExe[0x81] = 0x45; // "PE" signature
|
||||||
Files.write(dir.resolve("WIN.EXE"), windowsExe);
|
Files.write(dir.resolve("WIN.EXE"), windowsExe);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user