mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
Cleanup (L for duration)
This commit is contained in:
+7
-1
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2000-2012 JetBrains s.r.o.
|
||||
* Copyright 2000-2015 JetBrains s.r.o.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -35,6 +35,12 @@ public class TestFinishedEvent extends TreeNodeEvent {
|
||||
myDuration = duration;
|
||||
}
|
||||
|
||||
public TestFinishedEvent(@NotNull String name, long duration) {
|
||||
this(name, -1, duration);
|
||||
}
|
||||
|
||||
/** @deprecated use {@link #TestFinishedEvent(String, long)} (to be removed in IDEA 16) */
|
||||
@SuppressWarnings("unused")
|
||||
public TestFinishedEvent(@NotNull String name, int duration) {
|
||||
this(name, -1, duration);
|
||||
}
|
||||
|
||||
+7
-7
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2000-2009 JetBrains s.r.o.
|
||||
* Copyright 2000-2015 JetBrains s.r.o.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -218,7 +218,7 @@ public class GeneralToSMTRunnerEventsConvertorTest extends BaseSMTRunnerTestCase
|
||||
onTestStarted("some_test");
|
||||
final String fullName = myEventsProcessor.getFullTestName("some_test");
|
||||
final SMTestProxy proxy = myEventsProcessor.getProxyByFullTestName(fullName);
|
||||
myEventsProcessor.onTestFinished(new TestFinishedEvent("some_test", 10));
|
||||
myEventsProcessor.onTestFinished(new TestFinishedEvent("some_test", 10l));
|
||||
|
||||
assertEquals(0, myEventsProcessor.getRunningTestsQuantity());
|
||||
assertEquals(0, myEventsProcessor.getFailedTestsSet().size());
|
||||
@@ -263,7 +263,7 @@ public class GeneralToSMTRunnerEventsConvertorTest extends BaseSMTRunnerTestCase
|
||||
public void testOnFinishedTesting_WithFailure() {
|
||||
onTestStarted("test");
|
||||
myEventsProcessor.onTestFailure(new TestFailedEvent("test", "", "", false, null, null));
|
||||
myEventsProcessor.onTestFinished(new TestFinishedEvent("test", 10));
|
||||
myEventsProcessor.onTestFinished(new TestFinishedEvent("test", 10l));
|
||||
myEventsProcessor.onFinishTesting();
|
||||
|
||||
//Tree
|
||||
@@ -279,7 +279,7 @@ public class GeneralToSMTRunnerEventsConvertorTest extends BaseSMTRunnerTestCase
|
||||
public void testOnFinishedTesting_WithError() {
|
||||
onTestStarted("test");
|
||||
myEventsProcessor.onTestFailure(new TestFailedEvent("test", "", "", true, null, null));
|
||||
myEventsProcessor.onTestFinished(new TestFinishedEvent("test", 10));
|
||||
myEventsProcessor.onTestFinished(new TestFinishedEvent("test", 10l));
|
||||
myEventsProcessor.onFinishTesting();
|
||||
|
||||
//Tree
|
||||
@@ -295,7 +295,7 @@ public class GeneralToSMTRunnerEventsConvertorTest extends BaseSMTRunnerTestCase
|
||||
public void testOnFinishedTesting_WithIgnored() {
|
||||
onTestStarted("test");
|
||||
myEventsProcessor.onTestIgnored(new TestIgnoredEvent("test", "", null));
|
||||
myEventsProcessor.onTestFinished(new TestFinishedEvent("test", 10));
|
||||
myEventsProcessor.onTestFinished(new TestFinishedEvent("test", 10l));
|
||||
myEventsProcessor.onFinishTesting();
|
||||
|
||||
//Tree
|
||||
@@ -342,7 +342,7 @@ public class GeneralToSMTRunnerEventsConvertorTest extends BaseSMTRunnerTestCase
|
||||
assertEquals("suite3", test2.getParent().getName());
|
||||
assertEquals("suite2", test2.getParent().getParent().getName());
|
||||
|
||||
myEventsProcessor.onTestFinished(new TestFinishedEvent("test2", 10));
|
||||
myEventsProcessor.onTestFinished(new TestFinishedEvent("test2", 10l));
|
||||
|
||||
//check that after finishing suite (suite3), current will be parent of finished suite (i.e. suite2)
|
||||
myEventsProcessor.onSuiteFinished(new TestSuiteFinishedEvent("suite3"));
|
||||
@@ -387,7 +387,7 @@ public class GeneralToSMTRunnerEventsConvertorTest extends BaseSMTRunnerTestCase
|
||||
myEventsProcessor.onSuiteFinished(new TestSuiteFinishedEvent("suite1"));
|
||||
|
||||
myEventsProcessor.onSuiteStarted(new TestSuiteStartedEvent("suite2", null));
|
||||
myEventsProcessor.onTestFinished(new TestFinishedEvent("suite2.test1", 10));
|
||||
myEventsProcessor.onTestFinished(new TestFinishedEvent("suite2.test1", 10l));
|
||||
myEventsProcessor.onSuiteFinished(new TestSuiteFinishedEvent("suite2"));
|
||||
|
||||
assertNotNull(test1);
|
||||
|
||||
+2
-2
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2000-2009 JetBrains s.r.o.
|
||||
* Copyright 2000-2015 JetBrains s.r.o.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -341,7 +341,7 @@ public class SMTRunnerConsoleTest extends BaseSMTRunnerTestCase {
|
||||
"method1:1\n" +
|
||||
"method2:2\n" +
|
||||
"stderr1 ", "");
|
||||
myEventsProcessor.onTestFinished(new TestFinishedEvent("my_test", 1));
|
||||
myEventsProcessor.onTestFinished(new TestFinishedEvent("my_test", 1l));
|
||||
myTest1.setFinished();
|
||||
|
||||
//other output order
|
||||
|
||||
+5
-5
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2000-2009 JetBrains s.r.o.
|
||||
* Copyright 2000-2015 JetBrains s.r.o.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -235,14 +235,14 @@ public class SMTestRunnerResultsFormTest extends BaseSMTRunnerTestCase {
|
||||
myResultsViewer.performUpdate();
|
||||
myEventsProcessor.onTestFailure(new TestFailedEvent("test_failed", "", "", false, null, null));
|
||||
myResultsViewer.performUpdate();
|
||||
myEventsProcessor.onTestFinished(new TestFinishedEvent("test_failed", 10));
|
||||
myEventsProcessor.onTestFinished(new TestFinishedEvent("test_failed", 10l));
|
||||
myResultsViewer.performUpdate();
|
||||
|
||||
myEventsProcessor.onTestStarted(new TestStartedEvent("test", null));
|
||||
myResultsViewer.performUpdate();
|
||||
assertEquals(2, myTreeModel.getChildCount(myTreeModel.getChild(myTreeModel.getRoot(), 0)));
|
||||
|
||||
myEventsProcessor.onTestFinished(new TestFinishedEvent("test", 10));
|
||||
myEventsProcessor.onTestFinished(new TestFinishedEvent("test", 10l));
|
||||
assertEquals(2, myTreeModel.getChildCount(myTreeModel.getChild(myTreeModel.getRoot(), 0)));
|
||||
|
||||
myEventsProcessor.onSuiteFinished(new TestSuiteFinishedEvent("suite"));
|
||||
@@ -262,13 +262,13 @@ public class SMTestRunnerResultsFormTest extends BaseSMTRunnerTestCase {
|
||||
myResultsViewer.performUpdate();
|
||||
myEventsProcessor.onTestFailure(new TestFailedEvent("test_failed", "", "", false, null, null));
|
||||
myResultsViewer.performUpdate();
|
||||
myEventsProcessor.onTestFinished(new TestFinishedEvent("test_failed", 10));
|
||||
myEventsProcessor.onTestFinished(new TestFinishedEvent("test_failed", 10l));
|
||||
myResultsViewer.performUpdate();
|
||||
|
||||
myEventsProcessor.onTestStarted(new TestStartedEvent("test", null));
|
||||
myResultsViewer.performUpdate();
|
||||
|
||||
myEventsProcessor.onTestFinished(new TestFinishedEvent("test", 10));
|
||||
myEventsProcessor.onTestFinished(new TestFinishedEvent("test", 10l));
|
||||
myResultsViewer.performUpdate();
|
||||
|
||||
myEventsProcessor.onSuiteFinished(new TestSuiteFinishedEvent("suite2"));
|
||||
|
||||
Reference in New Issue
Block a user