@Test public final void testContextSharedDestroyed() { final JCGLSharedContextPair<JCGLContextType> p = this.newSharedContext("main", "alt"); final JCGLContextType c0 = p.getMasterContext(); final JCGLContextType c1 = p.getSlaveContext(); c1.contextDestroy(); this.expected.expect(JCGLExceptionDeleted.class); c0.contextIsSharedWith(c1); }
@Test public final void testContextSharedDestroyed() { final JCGLSharedContextPair<JCGLContextType> p = this.newSharedContext("main", "alt"); final JCGLContextType c0 = p.getMasterContext(); final JCGLContextType c1 = p.getSlaveContext(); c1.contextDestroy(); this.expected.expect(JCGLExceptionDeleted.class); c0.contextIsSharedWith(c1); }
@Test public final void testContextIdentitiesShared() { final JCGLSharedContextPair<JCGLContextType> p = this.newSharedContext("main", "alt"); final JCGLContextType c0 = p.getMasterContext(); final JCGLContextType c1 = p.getSlaveContext(); Assert.assertTrue(c0.contextIsSharedWith(c1)); Assert.assertSame( c0.contextGetImplementation(), c1.contextGetImplementation()); Assert.assertTrue(c0.contextGetShares().contains(c1)); }
@Test public final void testContextIdentitiesShared() { final JCGLSharedContextPair<JCGLContextType> p = this.newSharedContext("main", "alt"); final JCGLContextType c0 = p.getMasterContext(); final JCGLContextType c1 = p.getSlaveContext(); Assert.assertTrue(c0.contextIsSharedWith(c1)); Assert.assertSame( c0.contextGetImplementation(), c1.contextGetImplementation()); Assert.assertTrue(c0.contextGetShares().contains(c1)); }
@Test public final void testContextIdentities() { final JCGLContextType c0 = this.newContext("main"); Assert.assertTrue(c0.contextIsCurrent()); final JCGLContextType c1 = this.newContext("alt"); Assert.assertTrue(c1.contextIsCurrent()); Assert.assertFalse(c0.contextIsCurrent()); Assert.assertFalse(c0.contextIsSharedWith(c1)); Assert.assertSame( c0.contextGetImplementation(), c1.contextGetImplementation()); c1.contextReleaseCurrent(); Assert.assertFalse(c0.contextIsCurrent()); Assert.assertFalse(c1.contextIsCurrent()); Assert.assertEquals("main", c0.contextGetName()); Assert.assertEquals("alt", c1.contextGetName()); }
@Test public final void testContextIdentities() { final JCGLContextType c0 = this.newContext("main"); Assert.assertTrue(c0.contextIsCurrent()); final JCGLContextType c1 = this.newContext("alt"); Assert.assertTrue(c1.contextIsCurrent()); Assert.assertFalse(c0.contextIsCurrent()); Assert.assertFalse(c0.contextIsSharedWith(c1)); Assert.assertSame( c0.contextGetImplementation(), c1.contextGetImplementation()); c1.contextReleaseCurrent(); Assert.assertFalse(c0.contextIsCurrent()); Assert.assertFalse(c1.contextIsCurrent()); Assert.assertEquals("main", c0.contextGetName()); Assert.assertEquals("alt", c1.contextGetName()); }