cover with tests

This commit is contained in:
Andrey Starovoyt
2014-05-27 16:47:17 +04:00
parent ce036b544a
commit 8e0bbd5967
16 changed files with 134 additions and 5 deletions
@@ -0,0 +1,7 @@
public class Foo {
void m(boolean b) {
b.assert<caret>
value = null;
}
}
@@ -0,0 +1,7 @@
public class Foo {
void m(boolean b) {
assert b;<caret>
value = null;
}
}
@@ -0,0 +1,9 @@
public class Foo {
void m() {
is();.assert<caret>
}
boolean is() {
return false;
}
}
@@ -0,0 +1,9 @@
public class Foo {
void m() {
assert is();<caret>
}
boolean is() {
return false;
}
}
@@ -0,0 +1,7 @@
public class Foo {
void m(boolean b) {
b.if<caret>
value = null;
}
}
@@ -0,0 +1,9 @@
public class Foo {
void m(boolean b) {
if (b) {
<caret>
}
value = null;
}
}
@@ -0,0 +1,9 @@
public class Foo {
void m() {
is();.if<caret>
}
boolean is() {
return false;
}
}
@@ -0,0 +1,11 @@
public class Foo {
void m() {
if (is()) {
<caret>
}
}
boolean is() {
return false;
}
}
@@ -0,0 +1,9 @@
import java.lang.Exception;
public class Foo {
void m(Exception e) {
e.throw<caret>
value = null
}
}
@@ -0,0 +1,9 @@
import java.lang.Exception;
public class Foo {
void m(Exception e) {
throw e;<caret>
value = null
}
}
@@ -1,5 +1,5 @@
public class Foo {
void m(Object o) {
throw o;<caret>
o.throw <caret>
}
}
@@ -0,0 +1,7 @@
import java.lang.RuntimeException;
public class Foo {
void m() {
new RuntimeException("error");.throw<caret>
}
}
@@ -0,0 +1,7 @@
import java.lang.RuntimeException;
public class Foo {
void m() {
throw new RuntimeException("error");
}
}