diff options
author | Evgeny Mandrikov <Godin@users.noreply.github.com> | 2017-12-28 20:15:33 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-12-28 20:15:33 +0100 |
commit | 7f7c246f797fabf8a6e23da22d9c2ae2d8c2a51c (patch) | |
tree | 9c4c939791e41ea7d31e2f48efba6a10618e643f /org.jacoco.core.test/src/org/jacoco/core/internal/instr/ProbeArrayStrategyFactoryTest.java | |
parent | e050f1948abedc1f298ce2c10392309801039f49 (diff) | |
download | jacoco-7f7c246f797fabf8a6e23da22d9c2ae2d8c2a51c.tar.gz |
Offline instrumentation should not damage module-info (#634)
Diffstat (limited to 'org.jacoco.core.test/src/org/jacoco/core/internal/instr/ProbeArrayStrategyFactoryTest.java')
-rw-r--r-- | org.jacoco.core.test/src/org/jacoco/core/internal/instr/ProbeArrayStrategyFactoryTest.java | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/org.jacoco.core.test/src/org/jacoco/core/internal/instr/ProbeArrayStrategyFactoryTest.java b/org.jacoco.core.test/src/org/jacoco/core/internal/instr/ProbeArrayStrategyFactoryTest.java index a68e4990..2c655a79 100644 --- a/org.jacoco.core.test/src/org/jacoco/core/internal/instr/ProbeArrayStrategyFactoryTest.java +++ b/org.jacoco.core.test/src/org/jacoco/core/internal/instr/ProbeArrayStrategyFactoryTest.java @@ -211,6 +211,19 @@ public class ProbeArrayStrategyFactoryTest { true, 0); } + @Test + public void testModule() { + final ClassWriter writer = new ClassWriter(0); + writer.visit(Opcodes.V9, Opcodes.ACC_MODULE, "module-info", null, null, + null); + writer.visitModule("module", 0, null).visitEnd(); + writer.visitEnd(); + + final IProbeArrayStrategy strategy = ProbeArrayStrategyFactory + .createFor(new ClassReader(writer.toByteArray()), generator); + assertEquals(NoneProbeArrayStrategy.class, strategy.getClass()); + } + private IProbeArrayStrategy test(int version, int access, boolean clinit, boolean method, boolean abstractMethod) { final ClassWriter writer = new ClassWriter(0); |