mirror of
https://github.com/cappuccino/cappuccino.git
synced 2026-12-05 12:15:32 +00:00
Merge branch 'refs/heads/0.9.6'
This commit is contained in:
commit
519031a10e
3 files changed
+10
-3
No files matched your search
@@ -21,6 +21,7 @@
|
||||
*/
|
||||
|
||||
#include "CPRange.h"
|
||||
#include "Foundation.h"
|
||||
|
||||
@import "CPArray.j"
|
||||
@import "CPObject.j"
|
||||
@@ -79,6 +80,10 @@
|
||||
*/
|
||||
- (id)initWithIndex:(CPInteger)anIndex
|
||||
{
|
||||
if (!_IS_NUMERIC(anIndex))
|
||||
[CPException raise:CPInvalidArgumentException
|
||||
reason:"Invalid index"];
|
||||
|
||||
return [self initWithIndexesInRange:_CPMakeRange(anIndex, 1)];
|
||||
}
|
||||
|
||||
|
||||
@@ -90,10 +90,11 @@ var globalResults = [];
|
||||
|
||||
- (void)testRunModalForWindow
|
||||
{
|
||||
[app runModalForWindow:aWindow];
|
||||
var modalWindow = [[CPWindow alloc] init];
|
||||
[app runModalForWindow:modalWindow];
|
||||
|
||||
[self assertTrue:[aWindow isKeyWindow] message:@"A window must be made key when it's run modally"];
|
||||
[self assertFalse:[aWindow isMainWindow] message:@"A window must not become the main window when it's run modally"];
|
||||
[self assertTrue:[modalWindow isKeyWindow] message:@"A window must be made key when it's run modally"];
|
||||
[self assertFalse:[modalWindow isMainWindow] message:@"A window must not become the main window when it's run modally"];
|
||||
|
||||
[app abortModal];
|
||||
}
|
||||
|
||||
@@ -202,6 +202,7 @@ function descriptionWithoutEntity(aString)
|
||||
[self assertTrue:[[CPIndexSet indexSetWithIndex:1] containsIndex:1]];
|
||||
[self assertTrue:[[CPIndexSet indexSetWithIndex:0] containsIndex:0]];
|
||||
[self assertFalse:[[CPIndexSet indexSetWithIndex:0] containsIndex:1]];
|
||||
[self assertThrows:function() { [CPIndexSet indexSetWithIndex:NaN] }];
|
||||
}
|
||||
|
||||
- (void)testIndexSetWithIndexesInRange
|
||||
|
||||
Reference in new issue
Block a user