forked from cappuccino/cappuccino
-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
First unit test for CPString for method boolValue
- Loading branch information
vijaykiran
committed
Sep 16, 2008
1 parent
ec6c08e
commit 33c0dcd
Showing
1 changed file
with
42 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
import <Foundation/CPString.j> | ||
|
||
@implementation CPStringTest : OJTestCase | ||
|
||
- (void) testBoolValue | ||
{ | ||
var testString = @" 090"; | ||
[self assertTrue:[testString boolValue] message:"boolValue for the string " + testString + " should return true"]; | ||
|
||
testString = @" YES"; | ||
[self assertTrue:[testString boolValue] message:"boolValue for the string " + testString + " should return true"]; | ||
|
||
testString = @" true"; | ||
[self assertTrue:[testString boolValue] message:"boolValue for the string " + testString + " should return true"]; | ||
|
||
testString = @" True"; | ||
[self assertTrue:[testString boolValue] message:"boolValue for the string " + testString + " should return true"]; | ||
|
||
testString = @" tTR"; | ||
[self assertTrue:[testString boolValue] message:"boolValue for the string " + testString + " should return true"]; | ||
|
||
testString = @" +98"; | ||
[self assertTrue:[testString boolValue] message:"boolValue for the string " + testString + " should return true"]; | ||
|
||
testString = @" -98"; | ||
[self assertTrue:[testString boolValue] message:"boolValue for the string " + testString + " should return true"]; | ||
|
||
testString = @" +08"; | ||
[self assertTrue:[testString boolValue] message:"boolValue for the string " + testString + " should return true"]; | ||
|
||
testString = @" -98"; | ||
[self assertTrue:[testString boolValue] message:"boolValue for the string " + testString + " should return true"]; | ||
|
||
testString = @" NO"; | ||
[self assertFalse:[testString boolValue] message:"boolValue for the string " + testString + " should return true"]; | ||
|
||
testString = @" -N00"; | ||
[self assertFalse:[testString boolValue] message:"boolValue for the string " + testString + " should return true"]; | ||
} | ||
|
||
|
||
@end |