Skip to content

Commit

Permalink
Attempt to resolve Linux unit test failures
Browse files Browse the repository at this point in the history
  • Loading branch information
SomeRandomiOSDev committed Nov 14, 2023
1 parent 4f464b0 commit 2b7ba66
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions Sources/CBORCoding/CBORParser.swift
Original file line number Diff line number Diff line change
Expand Up @@ -639,6 +639,12 @@ internal class CBORParser {
} else {
result = (.nan, 3)
}
} else if half.isInfinite {
if half.sign == .minus {
result = (-.infinity, 3)
} else {
result = (.infinity, 3)
}
} else if let value = T(exactly: half) {
result = (value, 3)
} else {
Expand All @@ -659,6 +665,12 @@ internal class CBORParser {
} else {
result = (.nan, 5)
}
} else if float.isInfinite {
if float.sign == .minus {
result = (-.infinity, 5)
} else {
result = (.infinity, 5)
}
} else if let value = T(exactly: float) {
result = (value, 5)
} else {
Expand All @@ -679,6 +691,12 @@ internal class CBORParser {
} else {
result = (.nan, 9)
}
} else if double.isInfinite {
if double.sign == .minus {
result = (-.infinity, 9)
} else {
result = (.infinity, 9)
}
} else if let value = T(exactly: double) {
result = (value, 9)
} else {
Expand Down

0 comments on commit 2b7ba66

Please sign in to comment.