Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

8030204: com/sun/jdi/JdbExprTest.sh: Required output "Can\\'t convert 2147483648 to int" not found #497

Closed
wants to merge 3 commits into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
134 changes: 67 additions & 67 deletions jdk/test/com/sun/jdi/JdbExprTest.sh
Original file line number Diff line number Diff line change
@@ -45,9 +45,9 @@ import java.net.URL;
class $classname {
static long aLong;
static int anInt;
static boolean aBoolean;
static long aLong;
static int anInt;
static boolean aBoolean;
public static void bkpt() {
int i = 0; //@1 breakpoint
@@ -67,70 +67,70 @@ dojdbCmds()
setBkpts @1
runToBkpt @1

cmd print java.lang.Long.MAX_VALUE
jdbFailIfNotPresent " \= 9223372036854775807" 3

cmd print java.lang.Long.MIN_VALUE
jdbFailIfNotPresent " \= \-9223372036854775808" 3
cmd print 9223372036854775807L
jdbFailIfNotPresent "9223372036854775807L = 9223372036854775807" 3
cmd print 9223372036854775807
jdbFailIfNotPresent "9223372036854775807 = 9223372036854775807" 3

cmd print -9223372036854775807L
jdbFailIfNotPresent "\-9223372036854775807L = \-9223372036854775807" 3
cmd print -9223372036854775807
jdbFailIfNotPresent "\-9223372036854775807 = \-9223372036854775807" 3
cmd print -1
jdbFailIfNotPresent "\-1 = \-1" 3
cmd print 1L
jdbFailIfNotPresent "1L = 1" 3
cmd print -1L
jdbFailIfNotPresent "\-1L = \-1" 3
cmd print 0x1
jdbFailIfNotPresent "0x1 = 1" 3
cmd set $classname.aLong = 9223372036854775807L
cmd print $classname.aLong
jdbFailIfNotPresent "$classname.aLong = 9223372036854775807" 3

cmd set $classname.anInt = java.lang.Integer.MAX_VALUE + 1
cmd print $classname.anInt
jdbFailIfNotPresent "$classname.anInt = \-2147483648" 3

cmd set $classname.aLong = java.lang.Integer.MAX_VALUE + 1L
cmd print $classname.aLong
jdbFailIfNotPresent "$classname.aLong = 2147483648" 3

cmd set $classname.anInt = 0x80000000
jdbFailIfNotPresent "Can\'t convert 2147483648 to int" 3
cmd set $classname.anInt = 0x8000000000000000L
jdbFailIfNotPresent "java.lang.NumberFormatException: For input string: \"8000000000000000\"" 3

cmd set $classname.anInt = 0x7fffffff
jdbFailIfNotPresent "0x7fffffff = 2147483647" 3
cmd set $classname.aLong = 0x7fffffffffffffff
jdbFailIfNotPresent "0x7fffffffffffffff = 9223372036854775807" 3

cmd print 3.1415
jdbFailIfNotPresent "3.1415 = 3.1415" 3
cmd print -3.1415
jdbFailIfNotPresent "\-3.1415 = \-3.1415" 3
cmd print 011
jdbFailIfNotPresent "011 = 9" 3

cmd set $classname.aBoolean = false
jdbFailIfNotPresent "JdbExprTest.aBoolean = false = false" 3
cmd print $classname.aBoolean
jdbFailIfNotPresent "JdbExprTest.aBoolean = false" 3
cmd print !$classname.aBoolean
jdbFailIfNotPresent "JdbExprTest.aBoolean = true" 3

cmd print ~1
jdbFailIfNotPresent "~1 = -2" 3
cmd print java.lang.Long.MAX_VALUE
jdbFailIfNotPresent " \= 9223372036854775807" 3

cmd print java.lang.Long.MIN_VALUE
jdbFailIfNotPresent " \= \-9223372036854775808" 3
cmd print 9223372036854775807L
jdbFailIfNotPresent "9223372036854775807L = 9223372036854775807" 3
cmd print 9223372036854775807
jdbFailIfNotPresent "9223372036854775807 = 9223372036854775807" 3

cmd print -9223372036854775807L
jdbFailIfNotPresent "\-9223372036854775807L = \-9223372036854775807" 3
cmd print -9223372036854775807
jdbFailIfNotPresent "\-9223372036854775807 = \-9223372036854775807" 3
cmd print -1
jdbFailIfNotPresent "\-1 = \-1" 3
cmd print 1L
jdbFailIfNotPresent "1L = 1" 3
cmd print -1L
jdbFailIfNotPresent "\-1L = \-1" 3
cmd print 0x1
jdbFailIfNotPresent "0x1 = 1" 3
cmd set $classname.aLong = 9223372036854775807L
cmd print $classname.aLong
jdbFailIfNotPresent "$classname.aLong = 9223372036854775807" 3

cmd set $classname.anInt = java.lang.Integer.MAX_VALUE + 1
cmd print $classname.anInt
jdbFailIfNotPresent "$classname.anInt = \-2147483648" 3

cmd set $classname.aLong = java.lang.Integer.MAX_VALUE + 1L
cmd print $classname.aLong
jdbFailIfNotPresent "$classname.aLong = 2147483648" 3

cmd set $classname.anInt = 0x80000000
jdbFailIfNotPresent "InvalidTypeException: .* convert 2147483648 to int" 3
cmd set $classname.anInt = 0x8000000000000000L
jdbFailIfNotPresent "java.lang.NumberFormatException: For input string: \"8000000000000000\"" 3

cmd set $classname.anInt = 0x7fffffff
jdbFailIfNotPresent "0x7fffffff = 2147483647" 3
cmd set $classname.aLong = 0x7fffffffffffffff
jdbFailIfNotPresent "0x7fffffffffffffff = 9223372036854775807" 3

cmd print 3.1415
jdbFailIfNotPresent "3.1415 = 3.1415" 3
cmd print -3.1415
jdbFailIfNotPresent "\-3.1415 = \-3.1415" 3
cmd print 011
jdbFailIfNotPresent "011 = 9" 3

cmd set $classname.aBoolean = false
jdbFailIfNotPresent "JdbExprTest.aBoolean = false = false" 3
cmd print $classname.aBoolean
jdbFailIfNotPresent "JdbExprTest.aBoolean = false" 3
cmd print !$classname.aBoolean
jdbFailIfNotPresent "JdbExprTest.aBoolean = true" 3

cmd print ~1
jdbFailIfNotPresent "~1 = -2" 3
cmd quit
}