mirror of
https://github.com/cappuccino/cappuccino.git
synced 2026-08-26 05:27:03 +00:00
41 lines
1017 B
Plaintext
41 lines
1017 B
Plaintext
@import <AppKit/AppKit.j>
|
|
|
|
@implementation CPFontTest : OJTestCase
|
|
{
|
|
CPFont _systemFont;
|
|
CPFont _boldSystemFont;
|
|
|
|
CPFont _customFont;
|
|
CPFont _boldCustomFont;
|
|
}
|
|
|
|
- (void)setUp
|
|
{
|
|
_systemFont = [CPFont systemFontOfSize:15];
|
|
_boldSystemFont = [CPFont boldSystemFontOfSize:15];
|
|
|
|
_customFont = [CPFont fontWithName:@"Marker Felt, Lucida Grande, Helvetica" size:30];
|
|
_boldCustomFont = [CPFont boldFontWithName:@"Helvetica" size:30];
|
|
}
|
|
|
|
- (void)testSystemFontCSSString
|
|
{
|
|
[self assert:[_systemFont cssString] equals:@"15px Arial, sans-serif"];
|
|
}
|
|
|
|
- (void)testBoldSystemFontCSSString
|
|
{
|
|
[self assert:[_boldSystemFont cssString] equals:@"bold 15px Arial, sans-serif"];
|
|
}
|
|
|
|
- (void)testCustomFontCSSString
|
|
{
|
|
[self assert:[_customFont cssString] equals:@"30px \"Marker Felt\", \"Lucida Grande\", \"Helvetica\", Arial, sans-serif"];
|
|
}
|
|
|
|
- (void)testBoldCustomFontCSSString
|
|
{
|
|
[self assert:[_boldCustomFont cssString] equals:@"bold 30px \"Helvetica\", Arial, sans-serif"];
|
|
}
|
|
|
|
@end |