1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
|
TEST(@"-[longLongValue]",
C(@"1234").longLongValue == 1234 &&
C(@"\r\n+123 ").longLongValue == 123 &&
C(@"-500\t").longLongValue == -500 &&
[C(@"-0x10\t") longLongValueWithBase: 0] == -0x10 &&
C(@"\t\t\r\n").longLongValue == 0 &&
[C(@"123f") longLongValueWithBase: 16] == 0x123f &&
[C(@"\t\n0xABcd\r") longLongValueWithBase: 0] == 0xABCD &&
[C(@"1234567") longLongValueWithBase: 8] == 01234567 &&
[C(@"\r\n0123") longLongValueWithBase: 0] == 0123 &&
[C(@"765\t") longLongValueWithBase: 8] == 0765 &&
[C(@"\t\t\r\n") longLongValueWithBase: 8] == 0)
TEST(@"-[unsignedLongLongValue]",
C(@"1234").unsignedLongLongValue == 1234 &&
C(@"\r\n+123 ").unsignedLongLongValue == 123 &&
C(@"\t\t\r\n").unsignedLongLongValue == 0 &&
[C(@"123f") unsignedLongLongValueWithBase: 16] == 0x123f &&
[C(@"\t\n0xABcd\r") unsignedLongLongValueWithBase: 0] == 0xABCD &&
[C(@"1234567") unsignedLongLongValueWithBase: 8] == 01234567 &&
[C(@"\r\n0123") unsignedLongLongValueWithBase: 0] == 0123 &&
[C(@"765\t") unsignedLongLongValueWithBase: 8] == 0765 &&
[C(@"\t\t\r\n") unsignedLongLongValueWithBase: 8] == 0)
/*
|
>
>
|
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
|
TEST(@"-[longLongValue]",
C(@"1234").longLongValue == 1234 &&
C(@"\r\n+123 ").longLongValue == 123 &&
C(@"-500\t").longLongValue == -500 &&
[C(@"-0x10\t") longLongValueWithBase: 0] == -0x10 &&
C(@"\t\t\r\n").longLongValue == 0 &&
[C(@"123f") longLongValueWithBase: 16] == 0x123f &&
[C(@"-1234") longLongValueWithBase: 0] == -1234 &&
[C(@"\t\n0xABcd\r") longLongValueWithBase: 0] == 0xABCD &&
[C(@"1234567") longLongValueWithBase: 8] == 01234567 &&
[C(@"\r\n0123") longLongValueWithBase: 0] == 0123 &&
[C(@"765\t") longLongValueWithBase: 8] == 0765 &&
[C(@"\t\t\r\n") longLongValueWithBase: 8] == 0)
TEST(@"-[unsignedLongLongValue]",
C(@"1234").unsignedLongLongValue == 1234 &&
C(@"\r\n+123 ").unsignedLongLongValue == 123 &&
C(@"\t\t\r\n").unsignedLongLongValue == 0 &&
[C(@"123f") unsignedLongLongValueWithBase: 16] == 0x123f &&
[C(@"1234") unsignedLongLongValueWithBase: 0] == 1234 &&
[C(@"\t\n0xABcd\r") unsignedLongLongValueWithBase: 0] == 0xABCD &&
[C(@"1234567") unsignedLongLongValueWithBase: 8] == 01234567 &&
[C(@"\r\n0123") unsignedLongLongValueWithBase: 0] == 0123 &&
[C(@"765\t") unsignedLongLongValueWithBase: 8] == 0765 &&
[C(@"\t\t\r\n") unsignedLongLongValueWithBase: 8] == 0)
/*
|