Skip to content
This repository was archived by the owner on Aug 16, 2023. It is now read-only.

Commit 65b047d

Browse files
committed
Fix test with invalid value type.
1 parent 8f26549 commit 65b047d

1 file changed

Lines changed: 3 additions & 6 deletions

File tree

‎CMDQueryStringSerialization/CMDQueryStringWriter.m‎

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -36,12 +36,9 @@ - (NSString *)stringValue {
3636
else if ([value isKindOfClass:[NSArray class]]) {
3737
value = [value description];
3838
}
39-
// else {
40-
// @throw NSInvalidArgumentException;
41-
// }
42-
// if (![key isKindOfClass:[NSString class]]) {
43-
// @throw NSInvalidArgumentException;
44-
// }
39+
else {
40+
[NSException raise:NSInvalidArgumentException format:nil];
41+
}
4542
NSString *pair = [NSString stringWithFormat:@"%@=%@", [key cmd_stringByAddingEscapes], value];
4643
[pairs addObject:pair];
4744
}];

0 commit comments

Comments
 (0)