aboutsummaryrefslogtreecommitdiff
path: root/org.jacoco.core.test/src/org/jacoco/core/runtime
diff options
context:
space:
mode:
authorMarc R. Hoffmann <hoffmann@mountainminds.com>2010-07-21 13:31:32 +0000
committerMarc R. Hoffmann <hoffmann@mountainminds.com>2010-07-21 13:31:32 +0000
commit00059f0a2f8b15092d02136c9e8f94d9d497ca01 (patch)
tree2449ae954c1dcaa5d33f410c93e494e1c18c4816 /org.jacoco.core.test/src/org/jacoco/core/runtime
parent030cb77ae3dc26e51663bcd5cae4c771f064f245 (diff)
downloadjacoco-00059f0a2f8b15092d02136c9e8f94d9d497ca01.tar.gz
To reduce interferences with frameworks make fields added by instrumentation synthetic and transient.
Diffstat (limited to 'org.jacoco.core.test/src/org/jacoco/core/runtime')
-rw-r--r--org.jacoco.core.test/src/org/jacoco/core/runtime/ModifiedSystemClassRuntimeTest.java9
1 files changed, 6 insertions, 3 deletions
diff --git a/org.jacoco.core.test/src/org/jacoco/core/runtime/ModifiedSystemClassRuntimeTest.java b/org.jacoco.core.test/src/org/jacoco/core/runtime/ModifiedSystemClassRuntimeTest.java
index 2baaabca..f28e033b 100644
--- a/org.jacoco.core.test/src/org/jacoco/core/runtime/ModifiedSystemClassRuntimeTest.java
+++ b/org.jacoco.core.test/src/org/jacoco/core/runtime/ModifiedSystemClassRuntimeTest.java
@@ -66,8 +66,9 @@ public class ModifiedSystemClassRuntimeTest extends RuntimeTestBase {
// Our class should get instrumented:
final byte[] data = TargetLoader
.getClassDataAsBytes(ModifiedSystemClassRuntimeTest.class);
- verifyInstrumentedClass(TARGET_CLASS_NAME, transformer
- .transform(null, TARGET_CLASS_NAME, null, null, data));
+ verifyInstrumentedClass(TARGET_CLASS_NAME,
+ transformer.transform(null, TARGET_CLASS_NAME, null,
+ null, data));
// Other classes will not be instrumented:
assertNull(transformer.transform(getClass().getClassLoader(),
@@ -165,7 +166,9 @@ public class ModifiedSystemClassRuntimeTest extends RuntimeTestBase {
// Check added field:
final Field f = targetClass.getField("$jacocoAccess");
- assertEquals(Modifier.PUBLIC | Modifier.STATIC, f.getModifiers(), 0.0);
+ assertTrue(Modifier.isPublic(f.getModifiers()));
+ assertTrue(Modifier.isStatic(f.getModifiers()));
+ assertTrue(Modifier.isTransient(f.getModifiers()));
assertEquals(Object.class, f.getType());
}
}