Files
cappuccino/Tests/Foundation/CPStringTest.j
T
vijaykiran 34f58026df Updated assertFalse message in CPStringTest
Converted tabs to spaces according to coding guidelines
2008-09-17 11:56:57 +02:00

51 lines
2.0 KiB
Plaintext

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 false"];
testString = @" -N00";
[self assertFalse:[testString boolValue] message:"boolValue for the string " + testString + " should return false"];
testString = @" 00";
[self assertFalse:[testString boolValue] message:"boolValue for the string " + testString + " should return false"];
testString = @" -00";
[self assertFalse:[testString boolValue] message:"boolValue for the string " + testString + " should return false"];
}
@end