719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
|
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
|
-
+
-
+
|
#endif
OTAssertEqual([[self.stringClass stringWithString:
@"\r\n\tINF\t\n"] doubleValue], INFINITY);
OTAssertEqual([[self.stringClass stringWithString:
@"\r -INFINITY\n"] doubleValue], -INFINITY);
OTAssertTrue(isnan([[self.stringClass stringWithString:
OTAssert(isnan([[self.stringClass stringWithString:
@" NAN\t\t"] doubleValue]));
OTAssertTrue(isnan([[self.stringClass stringWithString:
OTAssert(isnan([[self.stringClass stringWithString:
@" -NaN\t\t"] doubleValue]));
}
- (void)testDoubleValueThrowsOnInvalidFormat
{
OTAssertThrowsSpecific([[self.stringClass stringWithString:
@"0.0a"] doubleValue], OFInvalidFormatException);
|
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
|
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
|
-
+
|
# endif
}
- (void)testPathComponents
{
# if defined(OF_WINDOWS) || defined(OF_MSDOS)
OTAssertEqualObjects([[self.stringClass stringWithString:
@"c:/tmp"].pathComponents],
@"c:/tmp"] pathComponents],
([OFArray arrayWithObjects: @"c:/", @"tmp", nil]));
OTAssertEqualObjects([[self.stringClass stringWithString:
@"c:\\tmp\\"] pathComponents],
([OFArray arrayWithObjects: @"c:\\", @"tmp", nil]));
OTAssertEqualObjects([[self.stringClass stringWithString:
|