From 61ee8133f28d6f70df89cf31e557a808267f8d6d Mon Sep 17 00:00:00 2001 From: Marc Khouzam Date: Fri, 20 Feb 2015 13:51:55 -0500 Subject: [PATCH] Small cleanup in the tests. Change-Id: I3236c0efc3de5dbc9b21ed33afbbaeb1439f4864 Signed-off-by: Marc Khouzam --- .../tests/dsf/gdb/tests/MIExpressionsTest.java | 18 ++++++++---------- .../tests/tests_7_5/MIExpressionsTest_7_5.java | 3 ++- 2 files changed, 10 insertions(+), 11 deletions(-) diff --git a/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/MIExpressionsTest.java b/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/MIExpressionsTest.java index 71e2fcc4910..e3bea65c082 100644 --- a/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/MIExpressionsTest.java +++ b/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/MIExpressionsTest.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2007, 2013 Ericsson and others. + * Copyright (c) 2007, 2015 Ericsson and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -7,6 +7,7 @@ * * Contributors: * Ericsson - Initial Implementation + * Simon Marchi (Ericsson) - Move some tests from AsyncCompletionWaitor to Query *******************************************************************************/ package org.eclipse.cdt.tests.dsf.gdb.tests; @@ -17,7 +18,6 @@ import static org.junit.Assert.assertTrue; import java.util.Arrays; import java.util.HashMap; -import java.util.List; import java.util.Map; import java.util.concurrent.TimeUnit; @@ -361,7 +361,7 @@ public class MIExpressionsTest extends BaseTestCase { final IExpressionDMContext exprDmc = SyncUtil.createExpression( frameDmc, "f"); - Query query = new Query() { + Query query = new Query() { @Override protected void execute(DataRequestMonitor rm) { fExpService.getExpressionData(exprDmc, rm); @@ -424,7 +424,7 @@ public class MIExpressionsTest extends BaseTestCase { // This second child is testing the fact that we could have the child named // the same as its type and we still want to be able to get the details without error. - query = new Query() { + query = new Query() { @Override protected void execute(DataRequestMonitor rm) { FormattedValueDMContext dmc = fExpService.getFormattedValueContext(children[1], MIExpressions.DETAILS_FORMAT); @@ -454,7 +454,7 @@ public class MIExpressionsTest extends BaseTestCase { final IExpressionDMContext[] children = getChildren(children1[0], new String[] { "nested", "pNested" }); final IExpressionDMContext[] childOfPointer = getChildren(children[1], new String[] { "*pNested" }); - Query query = new Query() { + Query query = new Query() { @Override protected void execute(DataRequestMonitor rm) { @@ -467,7 +467,7 @@ public class MIExpressionsTest extends BaseTestCase { fExpService.getExecutor().submit(query); query.get(); - query = new Query() { + query = new Query() { @Override protected void execute(DataRequestMonitor rm) { @@ -480,7 +480,7 @@ public class MIExpressionsTest extends BaseTestCase { fExpService.getExecutor().submit(query); query.get(); - query = new Query() { + query = new Query() { @Override protected void execute(DataRequestMonitor rm) { @@ -540,7 +540,7 @@ public class MIExpressionsTest extends BaseTestCase { assertThat(event.getDMContext(), is(exprDmc)); // Read the new value in decimal and check that it is what we expected - Query readQuery = new Query() { + Query readQuery = new Query() { @Override protected void execute(DataRequestMonitor rm) { @@ -554,8 +554,6 @@ public class MIExpressionsTest extends BaseTestCase { String actualDecimalValue = readQuery.get().getFormattedValue(); assertThat(actualDecimalValue.toLowerCase(), is(newValueInDecimal.toLowerCase())); - List events = eventWaitor.waitForEvents(100); - assertThat(events.size(), is(0)); } /** diff --git a/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_7_5/MIExpressionsTest_7_5.java b/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_7_5/MIExpressionsTest_7_5.java index 8d37ea29bcb..1b5093474df 100644 --- a/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_7_5/MIExpressionsTest_7_5.java +++ b/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_7_5/MIExpressionsTest_7_5.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2012 Ericsson and others. + * Copyright (c) 2012, 2015 Ericsson and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -7,6 +7,7 @@ * * Contributors: * Marc Khouzam (Ericsson) - Initial implementation of Test cases + * Simon Marchi (Ericsson) - Adapt to name change of assertChildrenCount *******************************************************************************/ package org.eclipse.cdt.tests.dsf.gdb.tests.tests_7_5;