Skip to content

Commit

Permalink
Add test for checkcast of nonexistent class (#105)
Browse files Browse the repository at this point in the history
  • Loading branch information
Storyyeller committed Dec 31, 2016
1 parent 3c1102d commit 53f539b
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 1 deletion.
1 change: 1 addition & 0 deletions tests/decompiler/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
'floattest': ([],),
'JSRTests': ([], ['x'], ['x', 'x', 'x', 'x']),
'LClassLiteralTest': ([],),
# 'NonexistentCheckcast': ([],),
'NullInference': ([], ['alice'], ['bob', 'carol']),
'OddsAndEnds': ([], ['x'], ['42'], ['4'], ['-2'], ['-0x567'], ['-5678']),
'splitnew': ([], ['-0'], ['-0', ''], ['-0', '', '', ''],
Expand Down
Binary file added tests/decompiler/classes/NonexistentCheckcast.class
Binary file not shown.
2 changes: 1 addition & 1 deletion tests/decompiler/source/BadInnerTest.j
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,4 @@
ldc "Bad inners, bad inners, whatcha gonna do?"
invokevirtual java/io/PrintStream println (Ljava/lang/Object;)V
return
.end method
.end method
12 changes: 12 additions & 0 deletions tests/decompiler/source/NonexistentCheckcast.j
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
; Originally created as a test for Krakatau (https://github.com/Storyyeller/Krakatau)
.class public NonexistentCheckcast
.super java/lang/Object

.method public static main : ([Ljava/lang/String;)V
.limit stack 10
.limit locals 10

aconst_null
checkcast wtf
return
.end method

0 comments on commit 53f539b

Please sign in to comment.