test/jdk/com/sun/jdi/JdbExprTest.java
author iignatyev
Fri, 14 Sep 2018 14:02:57 -0700
changeset 51754 594919232b8f
parent 51596 b8eea2a7569a
permissions -rw-r--r--
8210732: remove jdk.testlibrary.Utils Reviewed-by: alanb, jcbeyler
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
51539
2af74a1edb11 8203393: com/sun/jdi/JdbMethodExitTest.sh and JdbExprTest.sh fail due to timeout
amenkov
parents: 50185
diff changeset
     1
/*
2af74a1edb11 8203393: com/sun/jdi/JdbMethodExitTest.sh and JdbExprTest.sh fail due to timeout
amenkov
parents: 50185
diff changeset
     2
 * Copyright (c) 2013, 2018, Oracle and/or its affiliates. All rights reserved.
2af74a1edb11 8203393: com/sun/jdi/JdbMethodExitTest.sh and JdbExprTest.sh fail due to timeout
amenkov
parents: 50185
diff changeset
     3
 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
2af74a1edb11 8203393: com/sun/jdi/JdbMethodExitTest.sh and JdbExprTest.sh fail due to timeout
amenkov
parents: 50185
diff changeset
     4
 *
2af74a1edb11 8203393: com/sun/jdi/JdbMethodExitTest.sh and JdbExprTest.sh fail due to timeout
amenkov
parents: 50185
diff changeset
     5
 * This code is free software; you can redistribute it and/or modify it
2af74a1edb11 8203393: com/sun/jdi/JdbMethodExitTest.sh and JdbExprTest.sh fail due to timeout
amenkov
parents: 50185
diff changeset
     6
 * under the terms of the GNU General Public License version 2 only, as
2af74a1edb11 8203393: com/sun/jdi/JdbMethodExitTest.sh and JdbExprTest.sh fail due to timeout
amenkov
parents: 50185
diff changeset
     7
 * published by the Free Software Foundation.
2af74a1edb11 8203393: com/sun/jdi/JdbMethodExitTest.sh and JdbExprTest.sh fail due to timeout
amenkov
parents: 50185
diff changeset
     8
 *
2af74a1edb11 8203393: com/sun/jdi/JdbMethodExitTest.sh and JdbExprTest.sh fail due to timeout
amenkov
parents: 50185
diff changeset
     9
 * This code is distributed in the hope that it will be useful, but WITHOUT
2af74a1edb11 8203393: com/sun/jdi/JdbMethodExitTest.sh and JdbExprTest.sh fail due to timeout
amenkov
parents: 50185
diff changeset
    10
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
2af74a1edb11 8203393: com/sun/jdi/JdbMethodExitTest.sh and JdbExprTest.sh fail due to timeout
amenkov
parents: 50185
diff changeset
    11
 * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
2af74a1edb11 8203393: com/sun/jdi/JdbMethodExitTest.sh and JdbExprTest.sh fail due to timeout
amenkov
parents: 50185
diff changeset
    12
 * version 2 for more details (a copy is included in the LICENSE file that
2af74a1edb11 8203393: com/sun/jdi/JdbMethodExitTest.sh and JdbExprTest.sh fail due to timeout
amenkov
parents: 50185
diff changeset
    13
 * accompanied this code).
2af74a1edb11 8203393: com/sun/jdi/JdbMethodExitTest.sh and JdbExprTest.sh fail due to timeout
amenkov
parents: 50185
diff changeset
    14
 *
2af74a1edb11 8203393: com/sun/jdi/JdbMethodExitTest.sh and JdbExprTest.sh fail due to timeout
amenkov
parents: 50185
diff changeset
    15
 * You should have received a copy of the GNU General Public License version
2af74a1edb11 8203393: com/sun/jdi/JdbMethodExitTest.sh and JdbExprTest.sh fail due to timeout
amenkov
parents: 50185
diff changeset
    16
 * 2 along with this work; if not, write to the Free Software Foundation,
2af74a1edb11 8203393: com/sun/jdi/JdbMethodExitTest.sh and JdbExprTest.sh fail due to timeout
amenkov
parents: 50185
diff changeset
    17
 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
2af74a1edb11 8203393: com/sun/jdi/JdbMethodExitTest.sh and JdbExprTest.sh fail due to timeout
amenkov
parents: 50185
diff changeset
    18
 *
2af74a1edb11 8203393: com/sun/jdi/JdbMethodExitTest.sh and JdbExprTest.sh fail due to timeout
amenkov
parents: 50185
diff changeset
    19
 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
2af74a1edb11 8203393: com/sun/jdi/JdbMethodExitTest.sh and JdbExprTest.sh fail due to timeout
amenkov
parents: 50185
diff changeset
    20
 * or visit www.oracle.com if you need additional information or have any
2af74a1edb11 8203393: com/sun/jdi/JdbMethodExitTest.sh and JdbExprTest.sh fail due to timeout
amenkov
parents: 50185
diff changeset
    21
 * questions.
2af74a1edb11 8203393: com/sun/jdi/JdbMethodExitTest.sh and JdbExprTest.sh fail due to timeout
amenkov
parents: 50185
diff changeset
    22
 */
22050
72e7501ac569 4660158: TTY: NumberFormatException while trying to set values by 'set' command
sla
parents:
diff changeset
    23
51539
2af74a1edb11 8203393: com/sun/jdi/JdbMethodExitTest.sh and JdbExprTest.sh fail due to timeout
amenkov
parents: 50185
diff changeset
    24
/*
2af74a1edb11 8203393: com/sun/jdi/JdbMethodExitTest.sh and JdbExprTest.sh fail due to timeout
amenkov
parents: 50185
diff changeset
    25
 * @test
2af74a1edb11 8203393: com/sun/jdi/JdbMethodExitTest.sh and JdbExprTest.sh fail due to timeout
amenkov
parents: 50185
diff changeset
    26
 * @bug 4660158
2af74a1edb11 8203393: com/sun/jdi/JdbMethodExitTest.sh and JdbExprTest.sh fail due to timeout
amenkov
parents: 50185
diff changeset
    27
 * @summary javac produces the inconsistent variable debug in while loops.
2af74a1edb11 8203393: com/sun/jdi/JdbMethodExitTest.sh and JdbExprTest.sh fail due to timeout
amenkov
parents: 50185
diff changeset
    28
 * @comment converted from test/jdk/com/sun/jdi/JdbExprTest.sh
2af74a1edb11 8203393: com/sun/jdi/JdbMethodExitTest.sh and JdbExprTest.sh fail due to timeout
amenkov
parents: 50185
diff changeset
    29
 *
2af74a1edb11 8203393: com/sun/jdi/JdbMethodExitTest.sh and JdbExprTest.sh fail due to timeout
amenkov
parents: 50185
diff changeset
    30
 * @library /test/lib
2af74a1edb11 8203393: com/sun/jdi/JdbMethodExitTest.sh and JdbExprTest.sh fail due to timeout
amenkov
parents: 50185
diff changeset
    31
 * @compile -g JdbExprTest.java
2af74a1edb11 8203393: com/sun/jdi/JdbMethodExitTest.sh and JdbExprTest.sh fail due to timeout
amenkov
parents: 50185
diff changeset
    32
 * @run main/othervm JdbExprTest
2af74a1edb11 8203393: com/sun/jdi/JdbMethodExitTest.sh and JdbExprTest.sh fail due to timeout
amenkov
parents: 50185
diff changeset
    33
 */
22050
72e7501ac569 4660158: TTY: NumberFormatException while trying to set values by 'set' command
sla
parents:
diff changeset
    34
51539
2af74a1edb11 8203393: com/sun/jdi/JdbMethodExitTest.sh and JdbExprTest.sh fail due to timeout
amenkov
parents: 50185
diff changeset
    35
import lib.jdb.JdbCommand;
2af74a1edb11 8203393: com/sun/jdi/JdbMethodExitTest.sh and JdbExprTest.sh fail due to timeout
amenkov
parents: 50185
diff changeset
    36
import lib.jdb.JdbTest;
22050
72e7501ac569 4660158: TTY: NumberFormatException while trying to set values by 'set' command
sla
parents:
diff changeset
    37
72e7501ac569 4660158: TTY: NumberFormatException while trying to set values by 'set' command
sla
parents:
diff changeset
    38
import java.util.*;
72e7501ac569 4660158: TTY: NumberFormatException while trying to set values by 'set' command
sla
parents:
diff changeset
    39
import java.net.URLClassLoader;
72e7501ac569 4660158: TTY: NumberFormatException while trying to set values by 'set' command
sla
parents:
diff changeset
    40
import java.net.URL;
72e7501ac569 4660158: TTY: NumberFormatException while trying to set values by 'set' command
sla
parents:
diff changeset
    41
51539
2af74a1edb11 8203393: com/sun/jdi/JdbMethodExitTest.sh and JdbExprTest.sh fail due to timeout
amenkov
parents: 50185
diff changeset
    42
class JdbExprTestTarg {
50185
97be261ebcdd 8185803: JdbExprTest.sh fails in JDK10-hs nightly due to "Name unknown: java.lang.Long.MAX_VALUE "
cjplummer
parents: 47216
diff changeset
    43
    static Long lMax = new Long(java.lang.Long.MAX_VALUE); // force initialization of Long class
22051
7d02bfae9f53 8030204: com/sun/jdi/JdbExprTest.sh: Required output "Can\\'t convert 2147483648 to int" not found
sla
parents: 22050
diff changeset
    44
    static long aLong;
7d02bfae9f53 8030204: com/sun/jdi/JdbExprTest.sh: Required output "Can\\'t convert 2147483648 to int" not found
sla
parents: 22050
diff changeset
    45
    static int anInt;
7d02bfae9f53 8030204: com/sun/jdi/JdbExprTest.sh: Required output "Can\\'t convert 2147483648 to int" not found
sla
parents: 22050
diff changeset
    46
    static boolean aBoolean;
22050
72e7501ac569 4660158: TTY: NumberFormatException while trying to set values by 'set' command
sla
parents:
diff changeset
    47
72e7501ac569 4660158: TTY: NumberFormatException while trying to set values by 'set' command
sla
parents:
diff changeset
    48
    public static void bkpt() {
51539
2af74a1edb11 8203393: com/sun/jdi/JdbMethodExitTest.sh and JdbExprTest.sh fail due to timeout
amenkov
parents: 50185
diff changeset
    49
        int i = 0;     //@1 breakpoint
22050
72e7501ac569 4660158: TTY: NumberFormatException while trying to set values by 'set' command
sla
parents:
diff changeset
    50
    }
45028
b0ea3c0bfb81 8179889: Fix typographic errors in copyright headers
ihse
parents: 32018
diff changeset
    51
22050
72e7501ac569 4660158: TTY: NumberFormatException while trying to set values by 'set' command
sla
parents:
diff changeset
    52
    public static void main(String[] args) {
72e7501ac569 4660158: TTY: NumberFormatException while trying to set values by 'set' command
sla
parents:
diff changeset
    53
        bkpt();
72e7501ac569 4660158: TTY: NumberFormatException while trying to set values by 'set' command
sla
parents:
diff changeset
    54
    }
72e7501ac569 4660158: TTY: NumberFormatException while trying to set values by 'set' command
sla
parents:
diff changeset
    55
}
72e7501ac569 4660158: TTY: NumberFormatException while trying to set values by 'set' command
sla
parents:
diff changeset
    56
51539
2af74a1edb11 8203393: com/sun/jdi/JdbMethodExitTest.sh and JdbExprTest.sh fail due to timeout
amenkov
parents: 50185
diff changeset
    57
public class JdbExprTest extends JdbTest {
2af74a1edb11 8203393: com/sun/jdi/JdbMethodExitTest.sh and JdbExprTest.sh fail due to timeout
amenkov
parents: 50185
diff changeset
    58
    public static void main(String argv[]) {
2af74a1edb11 8203393: com/sun/jdi/JdbMethodExitTest.sh and JdbExprTest.sh fail due to timeout
amenkov
parents: 50185
diff changeset
    59
        new JdbExprTest().run();
2af74a1edb11 8203393: com/sun/jdi/JdbMethodExitTest.sh and JdbExprTest.sh fail due to timeout
amenkov
parents: 50185
diff changeset
    60
    }
22050
72e7501ac569 4660158: TTY: NumberFormatException while trying to set values by 'set' command
sla
parents:
diff changeset
    61
51539
2af74a1edb11 8203393: com/sun/jdi/JdbMethodExitTest.sh and JdbExprTest.sh fail due to timeout
amenkov
parents: 50185
diff changeset
    62
    private JdbExprTest() {
2af74a1edb11 8203393: com/sun/jdi/JdbMethodExitTest.sh and JdbExprTest.sh fail due to timeout
amenkov
parents: 50185
diff changeset
    63
        super(DEBUGGEE_CLASS);
2af74a1edb11 8203393: com/sun/jdi/JdbMethodExitTest.sh and JdbExprTest.sh fail due to timeout
amenkov
parents: 50185
diff changeset
    64
    }
22050
72e7501ac569 4660158: TTY: NumberFormatException while trying to set values by 'set' command
sla
parents:
diff changeset
    65
51539
2af74a1edb11 8203393: com/sun/jdi/JdbMethodExitTest.sh and JdbExprTest.sh fail due to timeout
amenkov
parents: 50185
diff changeset
    66
    private static final String DEBUGGEE_CLASS = JdbExprTestTarg.class.getName();
22050
72e7501ac569 4660158: TTY: NumberFormatException while trying to set values by 'set' command
sla
parents:
diff changeset
    67
51539
2af74a1edb11 8203393: com/sun/jdi/JdbMethodExitTest.sh and JdbExprTest.sh fail due to timeout
amenkov
parents: 50185
diff changeset
    68
    @Override
2af74a1edb11 8203393: com/sun/jdi/JdbMethodExitTest.sh and JdbExprTest.sh fail due to timeout
amenkov
parents: 50185
diff changeset
    69
    protected void runCases() {
51596
b8eea2a7569a 8209604: [TEST] rewrite com/sun/jdi shell tests to java version - step2
amenkov
parents: 51539
diff changeset
    70
        setBreakpointsFromTestSource("JdbExprTest.java", 1);
51539
2af74a1edb11 8203393: com/sun/jdi/JdbMethodExitTest.sh and JdbExprTest.sh fail due to timeout
amenkov
parents: 50185
diff changeset
    71
        // Run to breakpoint #1
2af74a1edb11 8203393: com/sun/jdi/JdbMethodExitTest.sh and JdbExprTest.sh fail due to timeout
amenkov
parents: 50185
diff changeset
    72
        execCommand(JdbCommand.run())
2af74a1edb11 8203393: com/sun/jdi/JdbMethodExitTest.sh and JdbExprTest.sh fail due to timeout
amenkov
parents: 50185
diff changeset
    73
                .shouldContain("Breakpoint hit");
2af74a1edb11 8203393: com/sun/jdi/JdbMethodExitTest.sh and JdbExprTest.sh fail due to timeout
amenkov
parents: 50185
diff changeset
    74
2af74a1edb11 8203393: com/sun/jdi/JdbMethodExitTest.sh and JdbExprTest.sh fail due to timeout
amenkov
parents: 50185
diff changeset
    75
        execCommand(JdbCommand.print("java.lang.Long.MAX_VALUE"))
2af74a1edb11 8203393: com/sun/jdi/JdbMethodExitTest.sh and JdbExprTest.sh fail due to timeout
amenkov
parents: 50185
diff changeset
    76
                .shouldContain(" = 9223372036854775807");
45028
b0ea3c0bfb81 8179889: Fix typographic errors in copyright headers
ihse
parents: 32018
diff changeset
    77
51539
2af74a1edb11 8203393: com/sun/jdi/JdbMethodExitTest.sh and JdbExprTest.sh fail due to timeout
amenkov
parents: 50185
diff changeset
    78
        execCommand(JdbCommand.print("java.lang.Long.MIN_VALUE"))
2af74a1edb11 8203393: com/sun/jdi/JdbMethodExitTest.sh and JdbExprTest.sh fail due to timeout
amenkov
parents: 50185
diff changeset
    79
                .shouldContain(" = -9223372036854775808");
45028
b0ea3c0bfb81 8179889: Fix typographic errors in copyright headers
ihse
parents: 32018
diff changeset
    80
51539
2af74a1edb11 8203393: com/sun/jdi/JdbMethodExitTest.sh and JdbExprTest.sh fail due to timeout
amenkov
parents: 50185
diff changeset
    81
        execCommand(JdbCommand.print("9223372036854775807L"))
2af74a1edb11 8203393: com/sun/jdi/JdbMethodExitTest.sh and JdbExprTest.sh fail due to timeout
amenkov
parents: 50185
diff changeset
    82
                .shouldContain("9223372036854775807L = 9223372036854775807");
2af74a1edb11 8203393: com/sun/jdi/JdbMethodExitTest.sh and JdbExprTest.sh fail due to timeout
amenkov
parents: 50185
diff changeset
    83
        execCommand(JdbCommand.print("9223372036854775807"))
2af74a1edb11 8203393: com/sun/jdi/JdbMethodExitTest.sh and JdbExprTest.sh fail due to timeout
amenkov
parents: 50185
diff changeset
    84
                .shouldContain("9223372036854775807 = 9223372036854775807");
22050
72e7501ac569 4660158: TTY: NumberFormatException while trying to set values by 'set' command
sla
parents:
diff changeset
    85
51539
2af74a1edb11 8203393: com/sun/jdi/JdbMethodExitTest.sh and JdbExprTest.sh fail due to timeout
amenkov
parents: 50185
diff changeset
    86
        execCommand(JdbCommand.print("-9223372036854775807L"))
2af74a1edb11 8203393: com/sun/jdi/JdbMethodExitTest.sh and JdbExprTest.sh fail due to timeout
amenkov
parents: 50185
diff changeset
    87
                .shouldContain("-9223372036854775807L = -9223372036854775807");
2af74a1edb11 8203393: com/sun/jdi/JdbMethodExitTest.sh and JdbExprTest.sh fail due to timeout
amenkov
parents: 50185
diff changeset
    88
        execCommand(JdbCommand.print("-9223372036854775807"))
2af74a1edb11 8203393: com/sun/jdi/JdbMethodExitTest.sh and JdbExprTest.sh fail due to timeout
amenkov
parents: 50185
diff changeset
    89
                .shouldContain("-9223372036854775807 = -9223372036854775807");
22050
72e7501ac569 4660158: TTY: NumberFormatException while trying to set values by 'set' command
sla
parents:
diff changeset
    90
51539
2af74a1edb11 8203393: com/sun/jdi/JdbMethodExitTest.sh and JdbExprTest.sh fail due to timeout
amenkov
parents: 50185
diff changeset
    91
        execCommand(JdbCommand.print("-1"))
2af74a1edb11 8203393: com/sun/jdi/JdbMethodExitTest.sh and JdbExprTest.sh fail due to timeout
amenkov
parents: 50185
diff changeset
    92
                .shouldContain("-1 = -1");
2af74a1edb11 8203393: com/sun/jdi/JdbMethodExitTest.sh and JdbExprTest.sh fail due to timeout
amenkov
parents: 50185
diff changeset
    93
        execCommand(JdbCommand.print("1L"))
2af74a1edb11 8203393: com/sun/jdi/JdbMethodExitTest.sh and JdbExprTest.sh fail due to timeout
amenkov
parents: 50185
diff changeset
    94
                .shouldContain("1L = 1");
2af74a1edb11 8203393: com/sun/jdi/JdbMethodExitTest.sh and JdbExprTest.sh fail due to timeout
amenkov
parents: 50185
diff changeset
    95
        execCommand(JdbCommand.print("-1L"))
2af74a1edb11 8203393: com/sun/jdi/JdbMethodExitTest.sh and JdbExprTest.sh fail due to timeout
amenkov
parents: 50185
diff changeset
    96
                .shouldContain("-1L = -1");
2af74a1edb11 8203393: com/sun/jdi/JdbMethodExitTest.sh and JdbExprTest.sh fail due to timeout
amenkov
parents: 50185
diff changeset
    97
        execCommand(JdbCommand.print("0x1"))
2af74a1edb11 8203393: com/sun/jdi/JdbMethodExitTest.sh and JdbExprTest.sh fail due to timeout
amenkov
parents: 50185
diff changeset
    98
                .shouldContain("0x1 = 1");
22050
72e7501ac569 4660158: TTY: NumberFormatException while trying to set values by 'set' command
sla
parents:
diff changeset
    99
51539
2af74a1edb11 8203393: com/sun/jdi/JdbMethodExitTest.sh and JdbExprTest.sh fail due to timeout
amenkov
parents: 50185
diff changeset
   100
        jdb.command(JdbCommand.set("JdbExprTestTarg.aLong", "9223372036854775807L"));
2af74a1edb11 8203393: com/sun/jdi/JdbMethodExitTest.sh and JdbExprTest.sh fail due to timeout
amenkov
parents: 50185
diff changeset
   101
        execCommand(JdbCommand.print("JdbExprTestTarg.aLong"))
2af74a1edb11 8203393: com/sun/jdi/JdbMethodExitTest.sh and JdbExprTest.sh fail due to timeout
amenkov
parents: 50185
diff changeset
   102
                .shouldContain("JdbExprTestTarg.aLong = 9223372036854775807");
22050
72e7501ac569 4660158: TTY: NumberFormatException while trying to set values by 'set' command
sla
parents:
diff changeset
   103
51539
2af74a1edb11 8203393: com/sun/jdi/JdbMethodExitTest.sh and JdbExprTest.sh fail due to timeout
amenkov
parents: 50185
diff changeset
   104
        jdb.command(JdbCommand.set("JdbExprTestTarg.anInt", "java.lang.Integer.MAX_VALUE + 1"));
2af74a1edb11 8203393: com/sun/jdi/JdbMethodExitTest.sh and JdbExprTest.sh fail due to timeout
amenkov
parents: 50185
diff changeset
   105
        execCommand(JdbCommand.print("JdbExprTestTarg.anInt"))
2af74a1edb11 8203393: com/sun/jdi/JdbMethodExitTest.sh and JdbExprTest.sh fail due to timeout
amenkov
parents: 50185
diff changeset
   106
                .shouldContain("JdbExprTestTarg.anInt = -2147483648");
2af74a1edb11 8203393: com/sun/jdi/JdbMethodExitTest.sh and JdbExprTest.sh fail due to timeout
amenkov
parents: 50185
diff changeset
   107
2af74a1edb11 8203393: com/sun/jdi/JdbMethodExitTest.sh and JdbExprTest.sh fail due to timeout
amenkov
parents: 50185
diff changeset
   108
        jdb.command(JdbCommand.set("JdbExprTestTarg.aLong", "java.lang.Integer.MAX_VALUE + 1L"));
2af74a1edb11 8203393: com/sun/jdi/JdbMethodExitTest.sh and JdbExprTest.sh fail due to timeout
amenkov
parents: 50185
diff changeset
   109
        execCommand(JdbCommand.print("JdbExprTestTarg.aLong"))
2af74a1edb11 8203393: com/sun/jdi/JdbMethodExitTest.sh and JdbExprTest.sh fail due to timeout
amenkov
parents: 50185
diff changeset
   110
                .shouldContain("JdbExprTestTarg.aLong = 2147483648");
22050
72e7501ac569 4660158: TTY: NumberFormatException while trying to set values by 'set' command
sla
parents:
diff changeset
   111
51539
2af74a1edb11 8203393: com/sun/jdi/JdbMethodExitTest.sh and JdbExprTest.sh fail due to timeout
amenkov
parents: 50185
diff changeset
   112
        execCommand(JdbCommand.set("JdbExprTestTarg.anInt", "0x80000000"))
2af74a1edb11 8203393: com/sun/jdi/JdbMethodExitTest.sh and JdbExprTest.sh fail due to timeout
amenkov
parents: 50185
diff changeset
   113
                .shouldMatch("InvalidTypeException: .* convert 2147483648 to int");
2af74a1edb11 8203393: com/sun/jdi/JdbMethodExitTest.sh and JdbExprTest.sh fail due to timeout
amenkov
parents: 50185
diff changeset
   114
        execCommand(JdbCommand.set("JdbExprTestTarg.anInt", "0x8000000000000000L"))
2af74a1edb11 8203393: com/sun/jdi/JdbMethodExitTest.sh and JdbExprTest.sh fail due to timeout
amenkov
parents: 50185
diff changeset
   115
                .shouldContain("java.lang.NumberFormatException: For input string: \"8000000000000000\"");
22050
72e7501ac569 4660158: TTY: NumberFormatException while trying to set values by 'set' command
sla
parents:
diff changeset
   116
51539
2af74a1edb11 8203393: com/sun/jdi/JdbMethodExitTest.sh and JdbExprTest.sh fail due to timeout
amenkov
parents: 50185
diff changeset
   117
        execCommand(JdbCommand.set("JdbExprTestTarg.anInt", "0x7fffffff"))
2af74a1edb11 8203393: com/sun/jdi/JdbMethodExitTest.sh and JdbExprTest.sh fail due to timeout
amenkov
parents: 50185
diff changeset
   118
                .shouldContain("0x7fffffff = 2147483647");
2af74a1edb11 8203393: com/sun/jdi/JdbMethodExitTest.sh and JdbExprTest.sh fail due to timeout
amenkov
parents: 50185
diff changeset
   119
        execCommand(JdbCommand.set("JdbExprTestTarg.aLong", "0x7fffffffffffffff"))
2af74a1edb11 8203393: com/sun/jdi/JdbMethodExitTest.sh and JdbExprTest.sh fail due to timeout
amenkov
parents: 50185
diff changeset
   120
                .shouldContain("0x7fffffffffffffff = 9223372036854775807");
22050
72e7501ac569 4660158: TTY: NumberFormatException while trying to set values by 'set' command
sla
parents:
diff changeset
   121
51539
2af74a1edb11 8203393: com/sun/jdi/JdbMethodExitTest.sh and JdbExprTest.sh fail due to timeout
amenkov
parents: 50185
diff changeset
   122
        execCommand(JdbCommand.print("3.1415"))
2af74a1edb11 8203393: com/sun/jdi/JdbMethodExitTest.sh and JdbExprTest.sh fail due to timeout
amenkov
parents: 50185
diff changeset
   123
                .shouldContain("3.1415 = 3.1415");
2af74a1edb11 8203393: com/sun/jdi/JdbMethodExitTest.sh and JdbExprTest.sh fail due to timeout
amenkov
parents: 50185
diff changeset
   124
        execCommand(JdbCommand.print("-3.1415"))
2af74a1edb11 8203393: com/sun/jdi/JdbMethodExitTest.sh and JdbExprTest.sh fail due to timeout
amenkov
parents: 50185
diff changeset
   125
                .shouldContain("-3.1415 = -3.1415");
2af74a1edb11 8203393: com/sun/jdi/JdbMethodExitTest.sh and JdbExprTest.sh fail due to timeout
amenkov
parents: 50185
diff changeset
   126
        execCommand(JdbCommand.print("011"))
2af74a1edb11 8203393: com/sun/jdi/JdbMethodExitTest.sh and JdbExprTest.sh fail due to timeout
amenkov
parents: 50185
diff changeset
   127
                .shouldContain("011 = 9");
22050
72e7501ac569 4660158: TTY: NumberFormatException while trying to set values by 'set' command
sla
parents:
diff changeset
   128
51539
2af74a1edb11 8203393: com/sun/jdi/JdbMethodExitTest.sh and JdbExprTest.sh fail due to timeout
amenkov
parents: 50185
diff changeset
   129
        execCommand(JdbCommand.set("JdbExprTestTarg.aBoolean", "false"))
2af74a1edb11 8203393: com/sun/jdi/JdbMethodExitTest.sh and JdbExprTest.sh fail due to timeout
amenkov
parents: 50185
diff changeset
   130
                .shouldContain("JdbExprTestTarg.aBoolean = false = false");
2af74a1edb11 8203393: com/sun/jdi/JdbMethodExitTest.sh and JdbExprTest.sh fail due to timeout
amenkov
parents: 50185
diff changeset
   131
        execCommand(JdbCommand.print("JdbExprTestTarg.aBoolean"))
2af74a1edb11 8203393: com/sun/jdi/JdbMethodExitTest.sh and JdbExprTest.sh fail due to timeout
amenkov
parents: 50185
diff changeset
   132
                .shouldContain("JdbExprTestTarg.aBoolean = false");
2af74a1edb11 8203393: com/sun/jdi/JdbMethodExitTest.sh and JdbExprTest.sh fail due to timeout
amenkov
parents: 50185
diff changeset
   133
        execCommand(JdbCommand.print("!JdbExprTestTarg.aBoolean"))
2af74a1edb11 8203393: com/sun/jdi/JdbMethodExitTest.sh and JdbExprTest.sh fail due to timeout
amenkov
parents: 50185
diff changeset
   134
                .shouldContain("JdbExprTestTarg.aBoolean = true");
22050
72e7501ac569 4660158: TTY: NumberFormatException while trying to set values by 'set' command
sla
parents:
diff changeset
   135
51539
2af74a1edb11 8203393: com/sun/jdi/JdbMethodExitTest.sh and JdbExprTest.sh fail due to timeout
amenkov
parents: 50185
diff changeset
   136
        execCommand(JdbCommand.print("~1"))
2af74a1edb11 8203393: com/sun/jdi/JdbMethodExitTest.sh and JdbExprTest.sh fail due to timeout
amenkov
parents: 50185
diff changeset
   137
                .shouldContain("~1 = -2");
2af74a1edb11 8203393: com/sun/jdi/JdbMethodExitTest.sh and JdbExprTest.sh fail due to timeout
amenkov
parents: 50185
diff changeset
   138
    }
2af74a1edb11 8203393: com/sun/jdi/JdbMethodExitTest.sh and JdbExprTest.sh fail due to timeout
amenkov
parents: 50185
diff changeset
   139
}