OSDN Git Service

Make the fixinc/Makefile.* files more similar
[pf3gnuchains/gcc-fork.git] / libjava / testsuite / libjava.lang / Divide_1.java
1 public class Divide_1
2 {
3   static int b = Integer.parseInt ("-1");  
4   int b1 = Integer.parseInt ("-1");  
5   static int zero = Integer.parseInt ("0");
6
7   void probe ()
8   {
9      try {
10       int a = Integer.parseInt ("-80000000", 16);
11       int c = a/b;
12       System.out.println (c);
13     } catch (Exception _) {
14       System.out.println (_);
15     }
16   
17     try {
18       int a = Integer.parseInt ("-80000000", 16);
19       int c = a/-1;
20       System.out.println (c);
21     } catch (Exception _) {
22       System.out.println (_);
23     }
24  
25     try {
26       int a = Integer.parseInt ("-80000000", 16);
27       int c = a%b;
28       System.out.println (c);
29     } catch (Exception _) {
30       System.out.println (_);
31     }
32  
33     try {
34       int a = Integer.parseInt ("-80000000", 16);
35       int c = a%b1;
36       System.out.println (c);
37     } catch (Exception _) {
38       System.out.println (_);
39     }
40  
41     try {
42       int a = Integer.parseInt ("-80000000", 16);
43       int c = a%-1;
44       System.out.println (c);
45     } catch (Exception _) {
46       System.out.println (_);
47     }
48  
49     try {
50       int a = Integer.parseInt ("8000", 16);
51       int b = Integer.parseInt ("0", 16);
52       int c = a/b;
53       System.out.println (c);
54     } catch (Exception _) {
55       System.out.println (_);
56     }
57  
58     try {
59       int a = Integer.parseInt ("8000", 16);
60       int b = Integer.parseInt ("0", 16);
61       int c = a%b;
62       System.out.println (c);
63     } catch (Exception _) {
64       System.out.println (_);
65     }
66  
67    try {
68       long a = Long.parseLong ("-8000000000000000", 16);
69       long c = a/b;
70       System.out.println (c);
71     } catch (Exception _) {
72       System.out.println (_);
73     }
74  
75     try {
76       long a = Long.parseLong ("-8000000000000000", 16);
77       long c = a%b;
78       System.out.println (c);
79     } catch (Exception _) {
80       System.out.println (_);
81     }
82
83     try {
84       long a = Long.parseLong ("8000", 16);
85       long b = Long.parseLong ("0", 16);
86       long c = a/b;
87       System.out.println (c);
88     } catch (Exception _) {
89       System.out.println (_);
90     }
91  
92     try {
93       long a = Long.parseLong ("8000", 16);
94       long b = Long.parseLong ("0", 16);
95       long c = a%b;
96       System.out.println (c);
97     } catch (Exception _) {
98       System.out.println (_);
99     }
100   }
101  
102   public static void main (String[] args) {
103     new Divide_1 ().probe ();
104   }
105 }