146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
|
[immutable rangeOfData: [OFData dataWithItems: "aaa"
itemSize: 3
count: 1]
options: 0
range: of_range(0, 1)])
EXPECT_EXCEPTION(
@"-[rangeOfString:options:range:] failing on out of range",
OFOutOfRangeException,
[immutable rangeOfData: [OFData dataWithItems: ""
itemSize: 2
count: 0]
options: 0
range: of_range(8, 1)])
TEST(@"-[MD5Hash]", [[mutable MD5Hash] isEqual: [@"abcde" MD5Hash]])
TEST(@"-[RIPEMD160Hash]", [[mutable RIPEMD160Hash]
isEqual: [@"abcde" RIPEMD160Hash]])
TEST(@"-[SHA1Hash]", [[mutable SHA1Hash] isEqual: [@"abcde" SHA1Hash]])
|
|
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
|
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
|
[immutable rangeOfData: [OFData dataWithItems: "aaa"
itemSize: 3
count: 1]
options: 0
range: of_range(0, 1)])
EXPECT_EXCEPTION(
@"-[rangeOfData:options:range:] failing on out of range",
OFOutOfRangeException,
[immutable rangeOfData: [OFData dataWithItems: ""
itemSize: 2
count: 0]
options: 0
range: of_range(8, 1)])
TEST(@"-[subdataWithRange:]",
[[immutable subdataWithRange: of_range(2, 4)]
isEqual: [OFData dataWithItems: "accdacaa"
itemSize: 2
count: 4]] &&
[[mutable subdataWithRange: of_range(2, 3)]
isEqual: [OFData dataWithItems: "cde"
count: 3]])
EXPECT_EXCEPTION(@"-[subdataWithRange:] failing on out of range #1",
OFOutOfRangeException, [immutable subdataWithRange: of_range(7, 1)])
EXPECT_EXCEPTION(@"-[subdataWithRange:] failing on out of range #2",
OFOutOfRangeException, [mutable subdataWithRange: of_range(6, 1)])
TEST(@"-[MD5Hash]", [[mutable MD5Hash] isEqual: [@"abcde" MD5Hash]])
TEST(@"-[RIPEMD160Hash]", [[mutable RIPEMD160Hash]
isEqual: [@"abcde" RIPEMD160Hash]])
TEST(@"-[SHA1Hash]", [[mutable SHA1Hash] isEqual: [@"abcde" SHA1Hash]])
|