-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Bugfix for empty string in const pool
- Loading branch information
1 parent
3e74f29
commit 240d321
Showing
4 changed files
with
54 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
mod utils; | ||
use utils::get_int; | ||
use utils::setup; | ||
|
||
#[test] | ||
fn empty_string_in_cpool() { | ||
let mut vm = setup(); | ||
let last_frame_value = vm | ||
.run("samples.javacore.strings.trivial.EmptyStringInCPool") | ||
.unwrap(); | ||
assert_eq!(0, get_int(last_frame_value)) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
package samples.javacore.strings.trivial; | ||
|
||
public class EmptyStringInCPool { | ||
public static void main(String[] args) { | ||
int result = "".length(); | ||
} | ||
} |
Binary file added
BIN
+377 Bytes
tests/test_data/samples/javacore/strings/trivial/EmptyStringInCPool.class
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters