summaryrefslogtreecommitdiff
path: root/libraries/base/tests/enum02.stdout-mips-sgi-irix
blob: 3177d541f4052535e2e43dbfb122d610fce7fc91 (plain)
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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
Testing Enum Int8:
    (succ (0::Int8)) = 1
    (succ (minBound::Int8)) = -127
    (succ (maxBound::Int8)) = error "Enum.succ{Int8}: tried to take `succ' of maxBound"
    pred (1::Int8) = 0
    pred (maxBound::Int8) = 126
    pred (minBound::Int8) = error "Enum.pred{Int8}: tried to take `pred' of minBound"
    (map (toEnum::Int->Int8) [1, fromIntegral (minBound::Int8), fromIntegral (maxBound::Int8)]) = [1,-128,127]
    (toEnum (maxBound::Int))::Int8 = error "Enum.toEnum{Int8}: tag (9223372036854775807) is outside of bounds (-128,127)"
    (map fromEnum [(1::Int8),minBound,maxBound]) = [1,-128,127]
    (take 7 [(1::Int8)..]) = [1,2,3,4,5,6,7]
    (take 7 [((maxBound::Int8)-5)..]) = [122,123,124,125,126,127]
    (take 7 [(1::Int8),2..]) = [1,2,3,4,5,6,7]
    (take 7 [(1::Int8),7..]) = [1,7,13,19,25,31,37]
    (take 7 [(1::Int8),1..]) = [1,1,1,1,1,1,1]
    (take 7 [(1::Int8),0..]) = [1,0,-1,-2,-3,-4,-5]
    (take 7 [(5::Int8),2..]) = [5,2,-1,-4,-7,-10,-13]
    (take 7 [x, x-1 ..]) = [-127,-128]
    (take 7 [x, x-1 ..]) = [-123,-124,-125,-126,-127,-128]
    (take 7 [x, (x+1) ..]) = [122,123,124,125,126,127]
    (take 7 ([(1::Int8) .. 5])) = [1,2,3,4,5]
    (take 4 ([(1::Int8) .. 1])) = [1]
    (take 7 ([(1::Int8) .. 0])) = []
    (take 7 ([(5::Int8) .. 0])) = []
    (take 7 ([(maxBound-(5::Int8)) .. maxBound])) = [122,123,124,125,126,127]
    (take 7 ([(minBound+(5::Int8)) .. minBound])) = []
    (take 7 [(5::Int8),4..1]) = [5,4,3,2,1]
    (take 7 [(5::Int8),3..1]) = [5,3,1]
    (take 7 [(5::Int8),3..2]) = [5,3]
    (take 7 [(1::Int8),2..1]) = [1]
    (take 7 [(2::Int8),1..2]) = [2]
    (take 7 [(2::Int8),1..1]) = [2,1]
    (take 7 [(2::Int8),3..1]) = []
    (take 7 [x,(x+1)..maxBound]) = [123,124,125,126,127]
    (take 7 [x,(x-1)..minBound]) = [-123,-124,-125,-126,-127,-128]
Testing Enum Int16:
    (succ (0::Int16)) = 1
    (succ (minBound::Int16)) = -32767
    (succ (maxBound::Int16)) = error "Enum.succ{Int16}: tried to take `succ' of maxBound"
    pred (1::Int16) = 0
    pred (maxBound::Int16) = 32766
    pred (minBound::Int16) = error "Enum.pred{Int16}: tried to take `pred' of minBound"
    (map (toEnum::Int->Int16) [1, fromIntegral (minBound::Int16), fromIntegral (maxBound::Int16)]) = [1,-32768,32767]
    (toEnum (maxBound::Int))::Int16 = error "Enum.toEnum{Int16}: tag (9223372036854775807) is outside of bounds (-32768,32767)"
    (map fromEnum [(1::Int16),minBound,maxBound]) = [1,-32768,32767]
    (take 7 [(1::Int16)..]) = [1,2,3,4,5,6,7]
    (take 7 [((maxBound::Int16)-5)..]) = [32762,32763,32764,32765,32766,32767]
    (take 7 [(1::Int16),2..]) = [1,2,3,4,5,6,7]
    (take 7 [(1::Int16),7..]) = [1,7,13,19,25,31,37]
    (take 7 [(1::Int16),1..]) = [1,1,1,1,1,1,1]
    (take 7 [(1::Int16),0..]) = [1,0,-1,-2,-3,-4,-5]
    (take 7 [(5::Int16),2..]) = [5,2,-1,-4,-7,-10,-13]
    (take 7 [x, x-1 ..]) = [-32767,-32768]
    (take 7 [x, x-1 ..]) = [-32763,-32764,-32765,-32766,-32767,-32768]
    (take 7 [x, (x+1) ..]) = [32762,32763,32764,32765,32766,32767]
    (take 7 ([(1::Int16) .. 5])) = [1,2,3,4,5]
    (take 4 ([(1::Int16) .. 1])) = [1]
    (take 7 ([(1::Int16) .. 0])) = []
    (take 7 ([(5::Int16) .. 0])) = []
    (take 7 ([(maxBound-(5::Int16)) .. maxBound])) = [32762,32763,32764,32765,32766,32767]
    (take 7 ([(minBound+(5::Int16)) .. minBound])) = []
    (take 7 [(5::Int16),4..1]) = [5,4,3,2,1]
    (take 7 [(5::Int16),3..1]) = [5,3,1]
    (take 7 [(5::Int16),3..2]) = [5,3]
    (take 7 [(1::Int16),2..1]) = [1]
    (take 7 [(2::Int16),1..2]) = [2]
    (take 7 [(2::Int16),1..1]) = [2,1]
    (take 7 [(2::Int16),3..1]) = []
    (take 7 [x,(x+1)..maxBound]) = [32763,32764,32765,32766,32767]
    (take 7 [x,(x-1)..minBound]) = [-32763,-32764,-32765,-32766,-32767,-32768]
Testing Enum Int32:
    (succ (0::Int32)) = 1
    (succ (minBound::Int32)) = -2147483647
    (succ (maxBound::Int32)) = error "Enum.succ{Int32}: tried to take `succ' of maxBound"
    pred (1::Int32) = 0
    pred (maxBound::Int32) = 2147483646
    pred (minBound::Int32) = error "Enum.pred{Int32}: tried to take `pred' of minBound"
    (map (toEnum::Int->Int32) [1, fromIntegral (minBound::Int32), fromIntegral (maxBound::Int32)]) = [1,-2147483648,2147483647]
    (toEnum (maxBound::Int))::Int32 = error "Enum.toEnum{Int32}: tag (9223372036854775807) is outside of bounds (-2147483648,2147483647)"
    (map fromEnum [(1::Int32),minBound,maxBound]) = [1,-2147483648,2147483647]
    (take 7 [(1::Int32)..]) = [1,2,3,4,5,6,7]
    (take 7 [((maxBound::Int32)-5)..]) = [2147483642,2147483643,2147483644,2147483645,2147483646,2147483647]
    (take 7 [(1::Int32),2..]) = [1,2,3,4,5,6,7]
    (take 7 [(1::Int32),7..]) = [1,7,13,19,25,31,37]
    (take 7 [(1::Int32),1..]) = [1,1,1,1,1,1,1]
    (take 7 [(1::Int32),0..]) = [1,0,-1,-2,-3,-4,-5]
    (take 7 [(5::Int32),2..]) = [5,2,-1,-4,-7,-10,-13]
    (take 7 [x, x-1 ..]) = [-2147483647,-2147483648]
    (take 7 [x, x-1 ..]) = [-2147483643,-2147483644,-2147483645,-2147483646,-2147483647,-2147483648]
    (take 7 [x, (x+1) ..]) = [2147483642,2147483643,2147483644,2147483645,2147483646,2147483647]
    (take 7 ([(1::Int32) .. 5])) = [1,2,3,4,5]
    (take 4 ([(1::Int32) .. 1])) = [1]
    (take 7 ([(1::Int32) .. 0])) = []
    (take 7 ([(5::Int32) .. 0])) = []
    (take 7 ([(maxBound-(5::Int32)) .. maxBound])) = [2147483642,2147483643,2147483644,2147483645,2147483646,2147483647]
    (take 7 ([(minBound+(5::Int32)) .. minBound])) = []
    (take 7 [(5::Int32),4..1]) = [5,4,3,2,1]
    (take 7 [(5::Int32),3..1]) = [5,3,1]
    (take 7 [(5::Int32),3..2]) = [5,3]
    (take 7 [(1::Int32),2..1]) = [1]
    (take 7 [(2::Int32),1..2]) = [2]
    (take 7 [(2::Int32),1..1]) = [2,1]
    (take 7 [(2::Int32),3..1]) = []
    (take 7 [x,(x+1)..maxBound]) = [2147483643,2147483644,2147483645,2147483646,2147483647]
    (take 7 [x,(x-1)..minBound]) = [-2147483643,-2147483644,-2147483645,-2147483646,-2147483647,-2147483648]
Testing Enum Int64:
    (succ (0::Int64)) = 1
    (succ (minBound::Int64)) = -9223372036854775807
    (succ (maxBound::Int64)) = error "Enum.succ{Int64}: tried to take `succ' of maxBound"
    pred (1::Int64) = 0
    pred (maxBound::Int64) = 9223372036854775806
    pred (minBound::Int64) = error "Enum.pred{Int64}: tried to take `pred' of minBound"
    (map (toEnum::Int->Int64) [1, fromIntegral (minBound::Int64), fromIntegral (maxBound::Int64)]) = [1,-9223372036854775808,9223372036854775807]
    (toEnum (maxBound::Int))::Int64 = 9223372036854775807
    (map fromEnum [(1::Int64),fromIntegral (minBound::Int) ,fromIntegral (maxBound::Int)]) = [1,-9223372036854775808,9223372036854775807]
    fromEnum (maxBound::Int64) = 9223372036854775807
    (take 7 [(1::Int64)..]) = [1,2,3,4,5,6,7]
    (take 7 [((maxBound::Int64)-5)..]) = [9223372036854775802,9223372036854775803,9223372036854775804,9223372036854775805,9223372036854775806,9223372036854775807]
    (take 7 [(1::Int64),2..]) = [1,2,3,4,5,6,7]
    (take 7 [(1::Int64),7..]) = [1,7,13,19,25,31,37]
    (take 7 [(1::Int64),1..]) = [1,1,1,1,1,1,1]
    (take 7 [(1::Int64),0..]) = [1,0,-1,-2,-3,-4,-5]
    (take 7 [(5::Int64),2..]) = [5,2,-1,-4,-7,-10,-13]
    (take 7 [x, x-1 ..]) = [-9223372036854775807,-9223372036854775808]
    (take 7 [x, x-1 ..]) = [-9223372036854775803,-9223372036854775804,-9223372036854775805,-9223372036854775806,-9223372036854775807,-9223372036854775808]
    (take 7 [x, (x+1) ..]) = [9223372036854775802,9223372036854775803,9223372036854775804,9223372036854775805,9223372036854775806,9223372036854775807]
    (take 7 ([(1::Int64) .. 5])) = [1,2,3,4,5]
    (take 4 ([(1::Int64) .. 1])) = [1]
    (take 7 ([(1::Int64) .. 0])) = []
    (take 7 ([(5::Int64) .. 0])) = []
    (take 7 ([(maxBound-(5::Int64)) .. maxBound])) = [9223372036854775802,9223372036854775803,9223372036854775804,9223372036854775805,9223372036854775806,9223372036854775807]
    (take 7 ([(minBound+(5::Int64)) .. minBound])) = []
    (take 7 [(5::Int64),4..1]) = [5,4,3,2,1]
    (take 7 [(5::Int64),3..1]) = [5,3,1]
    (take 7 [(5::Int64),3..2]) = [5,3]
    (take 7 [(1::Int64),2..1]) = [1]
    (take 7 [(2::Int64),1..2]) = [2]
    (take 7 [(2::Int64),1..1]) = [2,1]
    (take 7 [(2::Int64),3..1]) = []
    (take 7 [x,(x+1)..maxBound]) = [9223372036854775803,9223372036854775804,9223372036854775805,9223372036854775806,9223372036854775807]
    (take 7 [x,(x-1)..minBound]) = [-9223372036854775803,-9223372036854775804,-9223372036854775805,-9223372036854775806,-9223372036854775807,-9223372036854775808]