mirror of
https://github.com/cappuccino/cappuccino.git
synced 2026-09-03 17:33:41 +00:00
Previously, the unittests for the CPDatePicker broke the tests suite of cappuccino. A CPDatePicker uses a CALayer, and the CALayer display methods wasn't wrap in a #if PLATFOrM(DOM). Now it does, so during the tests we do not try to access do the element document anymore. This PR fixes also some warnings when compiling.
30 lines
519 B
Plaintext
30 lines
519 B
Plaintext
@import <OJUnit/OJTestCase.j>
|
|
|
|
@import <AppKit/CPDatePicker.j>
|
|
@import <AppKit/CPApplication.j>
|
|
@import <Foundation/Foundation.j>
|
|
|
|
[CPApplication sharedApplication];
|
|
|
|
@implementation CPDatePickerTest : OJTestCase
|
|
{
|
|
CPDatePicker datePicker;
|
|
}
|
|
|
|
- (void)setUp
|
|
{
|
|
datePicker = [[CPDatePicker alloc] initWithFrame:CGRectMake(200, 28, 0, 0)];
|
|
}
|
|
|
|
- (void)testCanCreate
|
|
{
|
|
[self assertTrue:!!datePicker];
|
|
}
|
|
|
|
- (void)testLayoutSubviews
|
|
{
|
|
[[CPRunLoop currentRunLoop] limitDateForMode:CPDefaultRunLoopMode];
|
|
}
|
|
|
|
@end
|