pivotal/cedar — pull request #107 by jeffh (2013-09-11 05:28:23+00:00)
Title: Literal Output for Expectations

Updated expectation and double output to use objc-styled literal syntax. The changes as follows:

- c types -> unchanged
- c strings -> double quotes around it with the content's double quotes and tabs escaped
- NSString -> @ + double quotes around it with the content's double quotes and tabs escaped
- NSArray -> @[]
- NSDictionary -> @{}
- NSSet -> [NSSet setWithObjects:..., nil]
- selectors -> @selector(myMethod:)
- NSNumber / NSDoubleNumber -> @(2)
- vector -> std::vector()
- set -> std::set()
- map -> std::map()
- NSValue -> either CDR_description, description, or @(23)
- Any other NSObject -> uses -[description] if implemented on that class or

NOTE: The internals for outputting objective-c objects has changed (to support custom stringifiers for NSObjects nested in the above data structures) to use a new, optional category method: CDR_description. The only exception to this rule is NSNumber*, because @encode(NSNumber*) == @encode(float).

Using CDR_description for NSObjects would need to be documented (for users that want nicer expectation output for custom objects).