Skip to content

Commit d12e98a

Browse files
committed
[Test] fix FontWeightHTMLTagStyleAttribute test cases
1 parent 9f70d94 commit d12e98a

File tree

2 files changed

+14
-3
lines changed

2 files changed

+14
-3
lines changed

Tests/ZMarkupParserTests/HTML/HTMLTagStyleAttributeToMarkupStyleVisitorTests.swift

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,18 @@ final class HTMLTagStyleAttributeToMarkupStyleVisitorTests: XCTestCase {
7575
let visitor = HTMLTagStyleAttributeToMarkupStyleVisitor(value: "500")
7676
let markupStyle = visitor.visit(FontWeightHTMLTagStyleAttribute())
7777

78-
if case let .rawValue(weight) = markupStyle?.font.weight, weight == 500 {
78+
if case let .style(style) = markupStyle?.font.weight, style == .medium {
79+
// Success
80+
} else {
81+
XCTFail()
82+
}
83+
}
84+
85+
func testFontWeightHTMLTagStyleAttribute3() {
86+
let visitor = HTMLTagStyleAttributeToMarkupStyleVisitor(value: "501")
87+
let markupStyle = visitor.visit(FontWeightHTMLTagStyleAttribute())
88+
89+
if case let .rawValue(weight) = markupStyle?.font.weight, weight == 501 {
7990
// Success
8091
} else {
8192
XCTFail()

ZMarkupParser.xcworkspace/xcshareddata/swiftpm/Package.resolved

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)