This commit is contained in:
Alexey Kudravtsev
2016-04-19 13:46:27 +03:00
parent 7676dc25c3
commit 8dbf994b4e
3 changed files with 7 additions and 7 deletions
@@ -1,5 +1,5 @@
/*
* Copyright 2000-2015 JetBrains s.r.o.
* Copyright 2000-2016 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.
@@ -30,7 +30,7 @@ import java.util.Map;
* @author cdr
*/
public class SliceBackwardTest extends SliceTestCase {
private final TIntObjectHashMap<IntArrayList> myFlownOffsets = new TIntObjectHashMap<IntArrayList>();
private final TIntObjectHashMap<IntArrayList> myFlownOffsets = new TIntObjectHashMap<>();
private void doTest() throws Exception {
configureByFile("/codeInsight/slice/backward/"+getTestName(false)+".java");
@@ -1,5 +1,5 @@
/*
* Copyright 2000-2013 JetBrains s.r.o.
* Copyright 2000-2016 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.
@@ -31,7 +31,7 @@ import java.util.Map;
* @author cdr
*/
public class SliceForwardTest extends DaemonAnalyzerTestCase {
private final TIntObjectHashMap<IntArrayList> myFlownOffsets = new TIntObjectHashMap<IntArrayList>();
private final TIntObjectHashMap<IntArrayList> myFlownOffsets = new TIntObjectHashMap<>();
private void dotest() throws Exception {
configureByFile("/codeInsight/slice/forward/"+getTestName(false)+".java");
@@ -1,5 +1,5 @@
/*
* Copyright 2000-2015 JetBrains s.r.o.
* Copyright 2000-2016 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.
@@ -97,7 +97,7 @@ public class SliceTreeTest extends SliceTestCase {
if (node.getDuplicate() != null) {
PsiElement element = node.getValue().getElement();
hasDups.add(element.getTextRange().getStartOffset());
assertTrue(element instanceof PsiParameter && ((PsiParameter)element).getName().equals("i") || element instanceof PsiLiteralExpression);
assertTrue(element instanceof PsiParameter && "i".equals(((PsiParameter)element).getName()) || element instanceof PsiLiteralExpression);
}
}
@@ -121,7 +121,7 @@ public class SliceTreeTest extends SliceTestCase {
int i = hasDups.indexOf(offset);
assertTrue(i != -1);
hasDups.remove(i);
assertTrue(element instanceof PsiParameter && ((PsiParameter)element).getName().equals("i") || element instanceof PsiLiteralExpression);
assertTrue(element instanceof PsiParameter && "i".equals(((PsiParameter)element).getName()) || element instanceof PsiLiteralExpression);
}
}
assertTrue(hasDups.isEmpty());