mirror of
https://github.com/cappuccino/cappuccino.git
synced 2026-08-25 13:07:02 +00:00
When parsing a predicate format that contains a constant boolean expression (e.g., 'key = YES') the value of the returned constant value expression has the wrong type. Instead of using native types as values, the parser uses [CPNumber +numberWithBool:]. This commit changes the format parser (CPPredicateScanner) to use native booleans for constant value expression. There's a test case that checks the parse result and an additional test that ensures boolean expressions evaluate as expected with different kinds of objects. The latter test passed before the fix but was added to ensure compliance with Cocoa.