mirror of
https://github.com/cappuccino/cappuccino.git
synced 2026-12-01 02:42:03 +00:00
CPArrayTest
This commit is contained in:
1 parent
ba189afaf5
commit
02b4187742
1 file changed
+21
@@ -0,0 +1,21 @@
|
||||
import <Foundation/CPArray.j>
|
||||
import <Foundation/CPString.j>
|
||||
import <Foundation/CPNumber.j>
|
||||
|
||||
@implementation CPArrayTest : OJTestCase
|
||||
|
||||
- (void)testComponentsJoinedByString
|
||||
{
|
||||
var testStrings = [
|
||||
[[], "", ""],
|
||||
[[], "-", ""],
|
||||
[[1,2], "-", "1-2"],
|
||||
[[1,2,3], "-", "1-2-3"],
|
||||
[["123", 456], "-", "123-456"]
|
||||
];
|
||||
|
||||
for (var i = 0; i < testStrings.length; i++)
|
||||
[self assert:[testStrings[i][0] componentsJoinedByString:testStrings[i][1]] equals:testStrings[i][2]];
|
||||
}
|
||||
|
||||
@end
|
||||
Reference in new issue
Block a user