@Test public final void testDeleteDeleted() { final JCGLTimersType g_t = this.getTimers("main"); final JCGLTimerQueryType q = g_t.timerQueryAllocate(); Assert.assertFalse(q.isDeleted()); g_t.timerQueryDelete(q); Assert.assertTrue(q.isDeleted()); this.expected.expect(JCGLExceptionDeleted.class); g_t.timerQueryDelete(q); }
@Test public final void testDeleteDeleted() { final JCGLTimersType g_t = this.getTimers("main"); final JCGLTimerQueryType q = g_t.timerQueryAllocate(); Assert.assertFalse(q.isDeleted()); g_t.timerQueryDelete(q); Assert.assertTrue(q.isDeleted()); this.expected.expect(JCGLExceptionDeleted.class); g_t.timerQueryDelete(q); }
void trim() { if (this.timer.isPresent()) { final JCGLTimerQueryType t = this.timer.get(); JCGLProfiling.this.timers.timerQueryDelete(t); this.timer = Optional.empty(); } final ObjectBidirectionalIterator<String> k_iter = this.children.keySet().iterator(); while (k_iter.hasNext()) { final String k = k_iter.next(); final Context c = this.children.get(k); c.trim(); k_iter.remove(); } Postconditions.checkPostcondition( this.children, this.children.isEmpty(), ignored -> "Child nodes have been correctly cleared"); Postconditions.checkPostcondition( this.timer, !this.timer.isPresent(), ignored -> "Timer must have been deleted"); }
@Test public final void testIdentities() { final JCGLTimersType g_t = this.getTimers("main"); final JCGLTimerQueryType q = g_t.timerQueryAllocate(); Assert.assertFalse(q.isDeleted()); g_t.timerQueryDelete(q); Assert.assertTrue(q.isDeleted()); }
@Test public final void testIdentities() { final JCGLTimersType g_t = this.getTimers("main"); final JCGLTimerQueryType q = g_t.timerQueryAllocate(); Assert.assertFalse(q.isDeleted()); g_t.timerQueryDelete(q); Assert.assertTrue(q.isDeleted()); }