mirror of
https://github.com/cappuccino/cappuccino.git
synced 2026-10-02 07:06:16 +00:00
Updated Test-Cases of CPNumberFormater and CPTextfield because of the
changes for fix #2332. The test-cased failed, because now a a CPDecimalNumber has a different UID compared to a CPNumber with the same value. That means isEqual: will return false. In the test-cases the formatter now generates CPNumbers to make the two Numbers compareable via isEqual.
This commit is contained in:
@@ -29,6 +29,7 @@
|
||||
|
||||
[numberFormatter setNumberStyle:CPNumberFormatterDecimalStyle];
|
||||
[numberFormatter setMaximumFractionDigits:3];
|
||||
[numberFormatter setGeneratesDecimalNumbers:NO];
|
||||
|
||||
[control setFormatter:numberFormatter];
|
||||
[control setStringValue:@"12.3456"];
|
||||
|
||||
@@ -62,6 +62,7 @@
|
||||
|
||||
[numberFormatter setMinimum:10];
|
||||
[numberFormatter setMaximum:20];
|
||||
[numberFormatter setGeneratesDecimalNumbers:NO];
|
||||
|
||||
[self assertTrue:[numberFormatter getObjectValue:objectValueRef forString:@"10" errorDescription:nil]
|
||||
message:@"MinMax T1: Expected True."];
|
||||
|
||||
Reference in New Issue
Block a user