Skip to content

Commit

Permalink
Updated unit tests for font value parsing. Resolves #22.
Browse files Browse the repository at this point in the history
  • Loading branch information
tolo committed Feb 4, 2015
1 parent 36be73b commit df2043a
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
6 changes: 6 additions & 0 deletions InterfaCSS Tests/ISSStyleSheetParserTests.m
Original file line number Diff line number Diff line change
Expand Up @@ -495,6 +495,12 @@ - (void) testFontPropertyValues {

value = [[self getPropertyValuesWithNames:@[@"font"] fromStyleClass:@"font5"] firstObject];
XCTAssertEqualObjects(value, [UIFont fontWithName:@"HelveticaNeue-Medium" size:5], @"Unexpected font value");

value = [[self getPropertyValuesWithNames:@[@"font"] fromStyleClass:@"font6"] firstObject];
XCTAssertEqualObjects(value, [UIFont fontWithName:@"Times New Roman" size:5], @"Unexpected font value");

value = [[self getPropertyValuesWithNames:@[@"font"] fromStyleClass:@"font7"] firstObject];
XCTAssertEqualObjects(value, [UIFont fontWithName:@"Times New Roman" size:5], @"Unexpected font value");
}

- (void) testImagePropertyValue {
Expand Down
6 changes: 6 additions & 0 deletions InterfaCSS Tests/TestData/styleSheetPropertyValues.css
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,12 @@
.font5 {
font: HelveticaNeue-Medium 5;
}
.font6 {
font: "Times New Roman" 5;
}
.font7 {
font: 'Times New Roman' 5;
}


.image1 {
Expand Down

0 comments on commit df2043a

Please sign in to comment.