Skip to content

Commit 53d89b1

Browse files
authored
Merge pull request #490 from smowton/use_remove_instanceof
Use remove instanceof
2 parents 61d69a6 + 5195a0c commit 53d89b1

31 files changed

+159
-41
lines changed
-240 Bytes
Binary file not shown.

regression/cbmc-java/instanceof1/instanceof1.java

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -2,18 +2,6 @@ class instanceof1
22
{
33
public static void main(String[] args)
44
{
5-
// absolutely everything is an Object
65
assert args instanceof Object;
7-
assert int.class instanceof Object;
8-
9-
// args is an array
10-
assert args instanceof Object[];
11-
12-
// string literals are strings
13-
assert "" instanceof String;
14-
15-
// need a negative example, too
16-
Object o=new Object();
17-
assert ! (o instanceof String);
186
}
197
};
597 Bytes
Binary file not shown.
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
class instanceof2
2+
{
3+
public static void main(String[] args)
4+
{
5+
assert int.class instanceof Object;
6+
}
7+
};
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
KNOWNBUG
2+
instanceof2.class
3+
4+
^EXIT=0$
5+
^SIGNAL=0$
6+
^VERIFICATION SUCCESSFUL$
7+
--
8+
^warning: ignoring
560 Bytes
Binary file not shown.
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
class instanceof3
2+
{
3+
public static void main(String[] args)
4+
{
5+
assert args instanceof Object[];
6+
}
7+
};
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
KNOWNBUG
2+
instanceof3.class
3+
4+
^EXIT=0$
5+
^SIGNAL=0$
6+
^VERIFICATION SUCCESSFUL$
7+
--
8+
^warning: ignoring
564 Bytes
Binary file not shown.
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
class instanceof4
2+
{
3+
public static void main(String[] args)
4+
{
5+
assert "" instanceof String;
6+
}
7+
};

0 commit comments

Comments
 (0)