Files
cappuccino/Tests/AppKit/CPDatePickerTest.j
T
Alexandre Wilhelm 4c1e22b0f6 Fixed: travis failed because the unittests tried to display a layer
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.
2015-07-06 14:14:39 -07:00

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