diff options
author | Evgeny Mandrikov <138671+Godin@users.noreply.github.com> | 2019-07-28 21:30:00 +0200 |
---|---|---|
committer | Marc R. Hoffmann <hoffmann@mountainminds.com> | 2019-07-28 21:30:00 +0200 |
commit | 81ba87bbfa01233608a5fe771017e1015c16fdae (patch) | |
tree | 6381591b37a505b34d3b6bb656e3f9b940ca86cc /org.jacoco.core.test/src | |
parent | 7a32ae362997d20141f59ceb119563287c2485e9 (diff) | |
download | jacoco-81ba87bbfa01233608a5fe771017e1015c16fdae.tar.gz |
Anonymous functions in Scala should not be filtered out (#912)
Diffstat (limited to 'org.jacoco.core.test/src')
-rw-r--r-- | org.jacoco.core.test/src/org/jacoco/core/internal/analysis/filter/SyntheticFilterTest.java | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/org.jacoco.core.test/src/org/jacoco/core/internal/analysis/filter/SyntheticFilterTest.java b/org.jacoco.core.test/src/org/jacoco/core/internal/analysis/filter/SyntheticFilterTest.java index 5b0a30ba..01b074ef 100644 --- a/org.jacoco.core.test/src/org/jacoco/core/internal/analysis/filter/SyntheticFilterTest.java +++ b/org.jacoco.core.test/src/org/jacoco/core/internal/analysis/filter/SyntheticFilterTest.java @@ -57,6 +57,17 @@ public class SyntheticFilterTest extends FilterTestBase { } @Test + public void should_not_filter_Scala_anonymous_functions() { + final MethodNode m = new MethodNode(InstrSupport.ASM_API_VERSION, + Opcodes.ACC_SYNTHETIC, "$anonfun$main$1", "()V", null, null); + m.visitInsn(Opcodes.RETURN); + + filter.filter(m, context, output); + + assertIgnored(); + } + + @Test public void should_not_filter_method_with_suffix_default_in_kotlin_classes() { final MethodNode m = new MethodNode(InstrSupport.ASM_API_VERSION, Opcodes.ACC_SYNTHETIC | Opcodes.ACC_BRIDGE, "example$default", |