Tests for unique java bytecode instrumentation selection

This commit is contained in:
Peter Schrammel 2017-08-31 16:32:16 +01:00
parent bbc99d9bef
commit e54bc4765e
9 changed files with 37 additions and 0 deletions

Binary file not shown.

View File

@ -0,0 +1,6 @@
class Test {
public static void main(String[] args) {
for (int i=0; i<3; i++) {
}
}
}

View File

@ -0,0 +1,7 @@
CORE
Test.class
--cover location --show-properties --verbosity 10
^EXIT=0$
^SIGNAL=0$
--
^Ignoring block .* java::Test\.main

Binary file not shown.

View File

@ -0,0 +1,3 @@
class Test {
static int s=5;
}

View File

@ -0,0 +1,8 @@
CORE
Test.class
--cover location --show-properties --verbosity 10
^EXIT=0$
^SIGNAL=0$
^java::Test\.<clinit>:\(\)V block 2, location 4: bytecode-index 1 already instrumented
^Ignoring block 2 location .* file Test\.java line 2 function java::Test\.<clinit>:\(\)V bytecode-index .* \(bytecode-index already instrumented\)
--

Binary file not shown.

View File

@ -0,0 +1,4 @@
class Test {
static int x = 0;
static int y = 1;
}

View File

@ -0,0 +1,9 @@
CORE
Test.class
--cover location --show-properties --verbosity 10
^EXIT=0$
^SIGNAL=0$
^java::Test\.<clinit>:\(\)V block 2, location 4: bytecode-index 1 already instrumented
^java::Test\.<clinit>:\(\)V block 2: location 5, bytecode-index 3 selected for instrumentation
--
^Ignoring block 2 location .* file Test\.java line 3 function java::Test\.<clinit>:\(\)V bytecode-index .* \(bytecode-index already instrumented\)