-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathexample_test.java
36 lines (33 loc) · 1.29 KB
/
example_test.java
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
import example.*;
public class example_test {
public static void main(String argv[]) {
//exampleJNI.datata();
Circle s = new Circle(2.0);
System.out.println(s.area());
System.out.println(s.perimeter());
System.out.println(s.test().area());
System.out.println(s.test().perimeter());
Circle c1 = s.test2();
System.out.println("c1.peri: "+c1.perimeter());
Circle c2 = s.test2();
System.out.println("c2.peri: "+c1.perimeter());
Circle c3 = c2.test2();
System.out.println(s.test2().area());
System.out.println(s.test2().perimeter());
System.out.println("c1==c2: "+(c1==c2));
System.out.println("c2==c3: "+(c2==c3));
System.out.println("s==s.getParam(s): "+(s==s.getParam(s)));
System.out.println("s==s.getThis(): "+(s==s.getThis()));
Triangle t = new Triangle(10);
System.out.println("t.test2()==t.test2(): "+(t.test2()==t.test2()));
System.out.println("t==t.getParam(t): "+(t==t.getParam(t)));
System.out.println("t==t.getThis(): "+(t==t.getThis()));
System.out.println("t.getToto(): "+t.getToto());
Square sq = new Square(1);
System.out.println("square created");
Square sq1 = sq.getSubSquare();
Square sq2 = sq.getSubSquare();
System.out.println("s==s: "+(sq1==sq2));
//s = (Circle) s.getCircle();
}
}