diff options
author | Evgeny Mandrikov <Godin@users.noreply.github.com> | 2018-07-24 12:56:21 +0200 |
---|---|---|
committer | Marc R. Hoffmann <hoffmann@mountainminds.com> | 2018-07-24 12:56:21 +0200 |
commit | 2961642572c82900a3133f5db086d90c7d5d525a (patch) | |
tree | 67241600bed12d8d5216481fef773c209ed0ed6f /org.jacoco.core.test.validation.java5/src | |
parent | 88e67b3f121121161f29f15ab8c45e6fc7ecd6d4 (diff) | |
download | jacoco-2961642572c82900a3133f5db086d90c7d5d525a.tar.gz |
Validation tests should use source filename from coverage results (#714)
To support non Java source files.
Diffstat (limited to 'org.jacoco.core.test.validation.java5/src')
-rw-r--r-- | org.jacoco.core.test.validation.java5/src/org/jacoco/core/test/filter/FinallyTest.java | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/org.jacoco.core.test.validation.java5/src/org/jacoco/core/test/filter/FinallyTest.java b/org.jacoco.core.test.validation.java5/src/org/jacoco/core/test/filter/FinallyTest.java index 9c6b2af4..2aa97562 100644 --- a/org.jacoco.core.test.validation.java5/src/org/jacoco/core/test/filter/FinallyTest.java +++ b/org.jacoco.core.test.validation.java5/src/org/jacoco/core/test/filter/FinallyTest.java @@ -21,7 +21,6 @@ import org.jacoco.core.analysis.ICounter; import org.jacoco.core.internal.BytecodeVersion; import org.jacoco.core.test.TargetLoader; import org.jacoco.core.test.filter.targets.Finally; -import org.jacoco.core.test.validation.Source; import org.jacoco.core.test.validation.ValidationTestBase; import org.junit.Test; import org.objectweb.asm.ClassReader; @@ -180,8 +179,6 @@ public class FinallyTest extends ValidationTestBase { */ @Test public void gotos() throws IOException { - final Source source = Source.getSourceFor("src", Finally.class); - byte[] b = TargetLoader.getClassDataAsBytes(Finally.class); b = BytecodeVersion.downgradeIfNeeded(BytecodeVersion.get(b), b); @@ -200,7 +197,7 @@ public class FinallyTest extends ValidationTestBase { lineNumber = ((LineNumberNode) i).line; } if (Opcodes.GOTO == i.getOpcode()) { - final String line = source.getLine(lineNumber); + final String line = getSource().getLine(lineNumber); if (line.indexOf('$') < 0) { throw new AssertionError( "No tag at line " + lineNumber); |