diff options
Diffstat (limited to 'libjava/testsuite/libjava.lang/err10.java')
-rw-r--r-- | libjava/testsuite/libjava.lang/err10.java | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/libjava/testsuite/libjava.lang/err10.java b/libjava/testsuite/libjava.lang/err10.java new file mode 100644 index 00000000000..afdb4e05504 --- /dev/null +++ b/libjava/testsuite/libjava.lang/err10.java @@ -0,0 +1,23 @@ +/*--------------------------------------------------------------------------*/ +/* File name : err10.java */ +/* : */ +/* Cause : Operator >>> doesn't work correctly when value is negative. */ +/* : */ +/* Message : NG : a = -2 */ +/*--------------------------------------------------------------------------*/ + +public class err10 { + public static void main(String[] args) { + int a = -3; + + a = a>>>1; + + if ( a == 2147483646 ) { + System.out.println("OK"); + } else { + System.out.println("NG:[2147483646]-->[" +a+ "]"); + } + + } +} + |