mirror of
https://github.com/NationalSecurityAgency/ghidra.git
synced 2024-11-25 13:42:06 +00:00
Merge remote-tracking branch 'origin/GP-0-dragonmacher-test-fixes-10-26-23'
This commit is contained in:
commit
ff12b4a068
@ -448,13 +448,24 @@ class RootNode extends WindowNode {
|
|||||||
|
|
||||||
private Rectangle getSaveableBounds() {
|
private Rectangle getSaveableBounds() {
|
||||||
|
|
||||||
|
//
|
||||||
|
// The goal of this method is to get the correct window bounds to save. When not maximized,
|
||||||
|
// this is simply the window's bounds. However, when maximized, we wish to save the last
|
||||||
|
// non-maximized bounds so that toggle in and out of the maximized state will use the
|
||||||
|
// correct non-maximized bounds.
|
||||||
|
//
|
||||||
|
JFrame frame = windowWrapper.getParentFrame();
|
||||||
|
int state = frame.getExtendedState();
|
||||||
|
if (state != Frame.MAXIMIZED_BOTH) {
|
||||||
|
return frame.getBounds();
|
||||||
|
}
|
||||||
|
|
||||||
Rectangle bounds = windowWrapper.getLastBounds();
|
Rectangle bounds = windowWrapper.getLastBounds();
|
||||||
if (bounds != null) {
|
if (bounds != null) {
|
||||||
return bounds;
|
return bounds;
|
||||||
}
|
}
|
||||||
|
|
||||||
// This implies the user has never maximized the window; just use the window bounds.
|
// This implies the user has never maximized the window; just use the window bounds.
|
||||||
JFrame frame = windowWrapper.getParentFrame();
|
|
||||||
return frame.getBounds();
|
return frame.getBounds();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -673,7 +684,6 @@ class RootNode extends WindowNode {
|
|||||||
// wish to save the non-maximized bounds.
|
// wish to save the non-maximized bounds.
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
this.lastBounds = bounds;
|
this.lastBounds = bounds;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -15,8 +15,7 @@
|
|||||||
*/
|
*/
|
||||||
package ghidra.pcode.exec;
|
package ghidra.pcode.exec;
|
||||||
|
|
||||||
import static org.junit.Assert.assertEquals;
|
import static org.junit.Assert.*;
|
||||||
import static org.junit.Assert.fail;
|
|
||||||
|
|
||||||
import java.io.File;
|
import java.io.File;
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
@ -79,9 +78,7 @@ public class SleighProgramCompilerTest extends AbstractGTest {
|
|||||||
Location loc = entry.loc();
|
Location loc = entry.loc();
|
||||||
assertEquals("test", loc.filename);
|
assertEquals("test", loc.filename);
|
||||||
assertEquals(1, loc.lineno);
|
assertEquals(1, loc.lineno);
|
||||||
assertEquals(
|
assertEquals("unknown varnode or bitrange symbol 'noreg' in expression", entry.msg());
|
||||||
"unknown start, end, next2, operand, epsilon, or varnode 'noreg' in varnode reference",
|
|
||||||
entry.msg());
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@ -97,8 +94,6 @@ public class SleighProgramCompilerTest extends AbstractGTest {
|
|||||||
Location loc = entry.loc();
|
Location loc = entry.loc();
|
||||||
assertEquals("expression", loc.filename);
|
assertEquals("expression", loc.filename);
|
||||||
assertEquals(1, loc.lineno);
|
assertEquals(1, loc.lineno);
|
||||||
assertEquals(
|
assertEquals("unknown varnode or bitrange symbol 'noreg' in expression", entry.msg());
|
||||||
"unknown start, end, next2, operand, epsilon, or varnode 'noreg' in varnode reference",
|
|
||||||
entry.msg());
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user