mirror of
https://github.com/GTNewHorizons/NotEnoughItems.git
synced 2026-11-19 11:59:17 +00:00
Various CPU and RAM improvements (#1015)
Co-authored-by: Martin Robertz <[email protected]>
This commit is contained in:
1 parent
866b796411
commit
3f38e6f39b
9 files changed
+236
-54
No files matched your search
@@ -0,0 +1,26 @@
|
||||
package codechicken.nei.guihook;
|
||||
|
||||
import static org.mockito.Mockito.mockStatic;
|
||||
import static org.mockito.Mockito.times;
|
||||
|
||||
import org.junit.jupiter.api.Test;
|
||||
import org.lwjgl.opengl.GL11;
|
||||
import org.mockito.MockedStatic;
|
||||
|
||||
public class GuiContainerManagerTest {
|
||||
|
||||
@Test
|
||||
void matrixStackLoggingSupportsNestedContexts() {
|
||||
try (MockedStatic<GL11> gl = mockStatic(GL11.class)) {
|
||||
GuiContainerManager.enableMatrixStackLogging();
|
||||
GuiContainerManager.enableMatrixStackLogging();
|
||||
GuiContainerManager.disableMatrixStackLogging();
|
||||
|
||||
gl.verify(() -> GL11.glPushAttrib(GL11.GL_ENABLE_BIT | GL11.GL_COLOR_BUFFER_BIT | GL11.GL_LIGHTING_BIT));
|
||||
gl.verify(GL11::glPopAttrib, times(0));
|
||||
|
||||
GuiContainerManager.disableMatrixStackLogging();
|
||||
gl.verify(GL11::glPopAttrib);
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user