File tree Expand file tree Collapse file tree 1 file changed +56
-0
lines changed Expand file tree Collapse file tree 1 file changed +56
-0
lines changed Original file line number Diff line number Diff line change
1
+
2
+ assert ( '<' , '15.3.3.2.1' ) do
3
+ class Foo
4
+ include Comparable
5
+ def <=>( x )
6
+ 0
7
+ end
8
+ end
9
+
10
+ ( Foo . new < Foo . new ) == false
11
+ end
12
+
13
+ assert ( '<=' , '15.3.3.2.2' ) do
14
+ class Foo
15
+ include Comparable
16
+ def <=>( x )
17
+ 0
18
+ end
19
+ end
20
+
21
+ ( Foo . new <= Foo . new ) == true
22
+ end
23
+
24
+ assert ( '==' , '15.3.3.2.3' ) do
25
+ class Foo
26
+ include Comparable
27
+ def <=>( x )
28
+ 0
29
+ end
30
+ end
31
+
32
+ ( Foo . new == Foo . new ) == true
33
+ end
34
+
35
+ assert ( '>' , '15.3.3.2.4' ) do
36
+ class Foo
37
+ include Comparable
38
+ def <=>( x )
39
+ 0
40
+ end
41
+ end
42
+
43
+ ( Foo . new > Foo . new ) == false
44
+ end
45
+
46
+ assert ( '>=' , '15.3.3.2.5' ) do
47
+ class Foo
48
+ include Comparable
49
+ def <=>( x )
50
+ 0
51
+ end
52
+ end
53
+
54
+ ( Foo . new >= Foo . new ) == true
55
+ end
56
+
You can’t perform that action at this time.
0 commit comments