Skip to content

Commit

Permalink
[Test] fix FontWeightHTMLTagStyleAttribute test cases
Browse files Browse the repository at this point in the history
  • Loading branch information
zhgchgli0718 committed Sep 3, 2023
1 parent 9f70d94 commit d12e98a
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,18 @@ final class HTMLTagStyleAttributeToMarkupStyleVisitorTests: XCTestCase {
let visitor = HTMLTagStyleAttributeToMarkupStyleVisitor(value: "500")
let markupStyle = visitor.visit(FontWeightHTMLTagStyleAttribute())

if case let .rawValue(weight) = markupStyle?.font.weight, weight == 500 {
if case let .style(style) = markupStyle?.font.weight, style == .medium {
// Success
} else {
XCTFail()
}
}

func testFontWeightHTMLTagStyleAttribute3() {
let visitor = HTMLTagStyleAttributeToMarkupStyleVisitor(value: "501")
let markupStyle = visitor.visit(FontWeightHTMLTagStyleAttribute())

if case let .rawValue(weight) = markupStyle?.font.weight, weight == 501 {
// Success
} else {
XCTFail()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
"kind" : "remoteSourceControl",
"location" : "https://github.com/pointfreeco/swift-snapshot-testing",
"state" : {
"revision" : "dc46eeb3928a75390651fac6c1ef7f93ad59a73b",
"version" : "1.11.1"
"revision" : "26ed3a2b4a2df47917ca9b790a57f91285b923fb",
"version" : "1.12.0"
}
},
{
Expand Down

0 comments on commit d12e98a

Please sign in to comment.