Skip to content

Commit

Permalink
Fixed linter errors
Browse files Browse the repository at this point in the history
  • Loading branch information
1ec5 committed Sep 29, 2021
1 parent 11c3965 commit ed429ce
Show file tree
Hide file tree
Showing 4 changed files with 48 additions and 48 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ final class CircleAnnotationTests: XCTestCase {
}
guard case let .object(layerProperties) = featureProperties["layerProperties"],
case let .number(circleSortKey) = layerProperties["circle-sort-key"] else {
return XCTFail()
return XCTFail("Layer property \(circle-sort-key) should be set to a number.")
}
XCTAssertEqual(circleSortKey, annotation.circleSortKey)
}
Expand All @@ -27,7 +27,7 @@ final class CircleAnnotationTests: XCTestCase {
}
guard case let .object(layerProperties) = featureProperties["layerProperties"],
case let .number(circleBlur) = layerProperties["circle-blur"] else {
return XCTFail()
return XCTFail("Layer property \(circle-blur) should be set to a number.")
}
XCTAssertEqual(circleBlur, annotation.circleBlur)
}
Expand All @@ -41,7 +41,7 @@ final class CircleAnnotationTests: XCTestCase {
}
guard case let .object(layerProperties) = featureProperties["layerProperties"],
case let .string(circleColor) = layerProperties["circle-color"] else {
return XCTFail()
return XCTFail("Layer property \(circle-color) should be set to a string.")
}
XCTAssertEqual(circleColor, annotation.circleColor.flatMap { $0.rgbaString })
}
Expand All @@ -55,7 +55,7 @@ final class CircleAnnotationTests: XCTestCase {
}
guard case let .object(layerProperties) = featureProperties["layerProperties"],
case let .number(circleOpacity) = layerProperties["circle-opacity"] else {
return XCTFail()
return XCTFail("Layer property \(circle-opacity) should be set to a number.")
}
XCTAssertEqual(circleOpacity, annotation.circleOpacity)
}
Expand All @@ -69,7 +69,7 @@ final class CircleAnnotationTests: XCTestCase {
}
guard case let .object(layerProperties) = featureProperties["layerProperties"],
case let .number(circleRadius) = layerProperties["circle-radius"] else {
return XCTFail()
return XCTFail("Layer property \(circle-radius) should be set to a number.")
}
XCTAssertEqual(circleRadius, annotation.circleRadius)
}
Expand All @@ -83,7 +83,7 @@ final class CircleAnnotationTests: XCTestCase {
}
guard case let .object(layerProperties) = featureProperties["layerProperties"],
case let .string(circleStrokeColor) = layerProperties["circle-stroke-color"] else {
return XCTFail()
return XCTFail("Layer property \(circle-stroke-color) should be set to a string.")
}
XCTAssertEqual(circleStrokeColor, annotation.circleStrokeColor.flatMap { $0.rgbaString })
}
Expand All @@ -97,7 +97,7 @@ final class CircleAnnotationTests: XCTestCase {
}
guard case let .object(layerProperties) = featureProperties["layerProperties"],
case let .number(circleStrokeOpacity) = layerProperties["circle-stroke-opacity"] else {
return XCTFail()
return XCTFail("Layer property \(circle-stroke-opacity) should be set to a number.")
}
XCTAssertEqual(circleStrokeOpacity, annotation.circleStrokeOpacity)
}
Expand All @@ -111,7 +111,7 @@ final class CircleAnnotationTests: XCTestCase {
}
guard case let .object(layerProperties) = featureProperties["layerProperties"],
case let .number(circleStrokeWidth) = layerProperties["circle-stroke-width"] else {
return XCTFail()
return XCTFail("Layer property \(circle-stroke-width) should be set to a number.")
}
XCTAssertEqual(circleStrokeWidth, annotation.circleStrokeWidth)
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ final class PointAnnotationTests: XCTestCase {
}
guard case let .object(layerProperties) = featureProperties["layerProperties"],
case let .string(iconAnchor) = layerProperties["icon-anchor"] else {
return XCTFail()
return XCTFail("Layer property \(icon-anchor) should be set to a string.")
}
XCTAssertEqual(iconAnchor, annotation.iconAnchor?.rawValue)
}
Expand All @@ -27,7 +27,7 @@ final class PointAnnotationTests: XCTestCase {
}
guard case let .object(layerProperties) = featureProperties["layerProperties"],
case let .string(iconImage) = layerProperties["icon-image"] else {
return XCTFail()
return XCTFail("Layer property \(icon-image) should be set to a string.")
}
XCTAssertEqual(iconImage, annotation.iconImage)
}
Expand All @@ -41,7 +41,7 @@ final class PointAnnotationTests: XCTestCase {
}
guard case let .object(layerProperties) = featureProperties["layerProperties"],
case let .array(iconOffset) = layerProperties["icon-offset"] else {
return XCTFail()
return XCTFail("Layer property \(icon-offset) should be set to a array of Doubles.")
}
XCTAssertEqual(iconOffset.compactMap { $0?.rawValue } as? [Double], annotation.iconOffset)
}
Expand All @@ -55,7 +55,7 @@ final class PointAnnotationTests: XCTestCase {
}
guard case let .object(layerProperties) = featureProperties["layerProperties"],
case let .number(iconRotate) = layerProperties["icon-rotate"] else {
return XCTFail()
return XCTFail("Layer property \(icon-rotate) should be set to a number.")
}
XCTAssertEqual(iconRotate, annotation.iconRotate)
}
Expand All @@ -69,7 +69,7 @@ final class PointAnnotationTests: XCTestCase {
}
guard case let .object(layerProperties) = featureProperties["layerProperties"],
case let .number(iconSize) = layerProperties["icon-size"] else {
return XCTFail()
return XCTFail("Layer property \(icon-size) should be set to a number.")
}
XCTAssertEqual(iconSize, annotation.iconSize)
}
Expand All @@ -83,7 +83,7 @@ final class PointAnnotationTests: XCTestCase {
}
guard case let .object(layerProperties) = featureProperties["layerProperties"],
case let .number(symbolSortKey) = layerProperties["symbol-sort-key"] else {
return XCTFail()
return XCTFail("Layer property \(symbol-sort-key) should be set to a number.")
}
XCTAssertEqual(symbolSortKey, annotation.symbolSortKey)
}
Expand All @@ -97,7 +97,7 @@ final class PointAnnotationTests: XCTestCase {
}
guard case let .object(layerProperties) = featureProperties["layerProperties"],
case let .string(textAnchor) = layerProperties["text-anchor"] else {
return XCTFail()
return XCTFail("Layer property \(text-anchor) should be set to a string.")
}
XCTAssertEqual(textAnchor, annotation.textAnchor?.rawValue)
}
Expand All @@ -111,7 +111,7 @@ final class PointAnnotationTests: XCTestCase {
}
guard case let .object(layerProperties) = featureProperties["layerProperties"],
case let .string(textField) = layerProperties["text-field"] else {
return XCTFail()
return XCTFail("Layer property \(text-field) should be set to a string.")
}
XCTAssertEqual(textField, annotation.textField)
}
Expand All @@ -125,7 +125,7 @@ final class PointAnnotationTests: XCTestCase {
}
guard case let .object(layerProperties) = featureProperties["layerProperties"],
case let .string(textJustify) = layerProperties["text-justify"] else {
return XCTFail()
return XCTFail("Layer property \(text-justify) should be set to a string.")
}
XCTAssertEqual(textJustify, annotation.textJustify?.rawValue)
}
Expand All @@ -139,7 +139,7 @@ final class PointAnnotationTests: XCTestCase {
}
guard case let .object(layerProperties) = featureProperties["layerProperties"],
case let .number(textLetterSpacing) = layerProperties["text-letter-spacing"] else {
return XCTFail()
return XCTFail("Layer property \(text-letter-spacing) should be set to a number.")
}
XCTAssertEqual(textLetterSpacing, annotation.textLetterSpacing)
}
Expand All @@ -153,7 +153,7 @@ final class PointAnnotationTests: XCTestCase {
}
guard case let .object(layerProperties) = featureProperties["layerProperties"],
case let .number(textMaxWidth) = layerProperties["text-max-width"] else {
return XCTFail()
return XCTFail("Layer property \(text-max-width) should be set to a number.")
}
XCTAssertEqual(textMaxWidth, annotation.textMaxWidth)
}
Expand All @@ -167,7 +167,7 @@ final class PointAnnotationTests: XCTestCase {
}
guard case let .object(layerProperties) = featureProperties["layerProperties"],
case let .array(textOffset) = layerProperties["text-offset"] else {
return XCTFail()
return XCTFail("Layer property \(text-offset) should be set to a array of Doubles.")
}
XCTAssertEqual(textOffset.compactMap { $0?.rawValue } as? [Double], annotation.textOffset)
}
Expand All @@ -181,7 +181,7 @@ final class PointAnnotationTests: XCTestCase {
}
guard case let .object(layerProperties) = featureProperties["layerProperties"],
case let .number(textRadialOffset) = layerProperties["text-radial-offset"] else {
return XCTFail()
return XCTFail("Layer property \(text-radial-offset) should be set to a number.")
}
XCTAssertEqual(textRadialOffset, annotation.textRadialOffset)
}
Expand All @@ -195,7 +195,7 @@ final class PointAnnotationTests: XCTestCase {
}
guard case let .object(layerProperties) = featureProperties["layerProperties"],
case let .number(textRotate) = layerProperties["text-rotate"] else {
return XCTFail()
return XCTFail("Layer property \(text-rotate) should be set to a number.")
}
XCTAssertEqual(textRotate, annotation.textRotate)
}
Expand All @@ -209,7 +209,7 @@ final class PointAnnotationTests: XCTestCase {
}
guard case let .object(layerProperties) = featureProperties["layerProperties"],
case let .number(textSize) = layerProperties["text-size"] else {
return XCTFail()
return XCTFail("Layer property \(text-size) should be set to a number.")
}
XCTAssertEqual(textSize, annotation.textSize)
}
Expand All @@ -223,7 +223,7 @@ final class PointAnnotationTests: XCTestCase {
}
guard case let .object(layerProperties) = featureProperties["layerProperties"],
case let .string(textTransform) = layerProperties["text-transform"] else {
return XCTFail()
return XCTFail("Layer property \(text-transform) should be set to a string.")
}
XCTAssertEqual(textTransform, annotation.textTransform?.rawValue)
}
Expand All @@ -237,7 +237,7 @@ final class PointAnnotationTests: XCTestCase {
}
guard case let .object(layerProperties) = featureProperties["layerProperties"],
case let .string(iconColor) = layerProperties["icon-color"] else {
return XCTFail()
return XCTFail("Layer property \(icon-color) should be set to a string.")
}
XCTAssertEqual(iconColor, annotation.iconColor.flatMap { $0.rgbaString })
}
Expand All @@ -251,7 +251,7 @@ final class PointAnnotationTests: XCTestCase {
}
guard case let .object(layerProperties) = featureProperties["layerProperties"],
case let .number(iconHaloBlur) = layerProperties["icon-halo-blur"] else {
return XCTFail()
return XCTFail("Layer property \(icon-halo-blur) should be set to a number.")
}
XCTAssertEqual(iconHaloBlur, annotation.iconHaloBlur)
}
Expand All @@ -265,7 +265,7 @@ final class PointAnnotationTests: XCTestCase {
}
guard case let .object(layerProperties) = featureProperties["layerProperties"],
case let .string(iconHaloColor) = layerProperties["icon-halo-color"] else {
return XCTFail()
return XCTFail("Layer property \(icon-halo-color) should be set to a string.")
}
XCTAssertEqual(iconHaloColor, annotation.iconHaloColor.flatMap { $0.rgbaString })
}
Expand All @@ -279,7 +279,7 @@ final class PointAnnotationTests: XCTestCase {
}
guard case let .object(layerProperties) = featureProperties["layerProperties"],
case let .number(iconHaloWidth) = layerProperties["icon-halo-width"] else {
return XCTFail()
return XCTFail("Layer property \(icon-halo-width) should be set to a number.")
}
XCTAssertEqual(iconHaloWidth, annotation.iconHaloWidth)
}
Expand All @@ -293,7 +293,7 @@ final class PointAnnotationTests: XCTestCase {
}
guard case let .object(layerProperties) = featureProperties["layerProperties"],
case let .number(iconOpacity) = layerProperties["icon-opacity"] else {
return XCTFail()
return XCTFail("Layer property \(icon-opacity) should be set to a number.")
}
XCTAssertEqual(iconOpacity, annotation.iconOpacity)
}
Expand All @@ -307,7 +307,7 @@ final class PointAnnotationTests: XCTestCase {
}
guard case let .object(layerProperties) = featureProperties["layerProperties"],
case let .string(textColor) = layerProperties["text-color"] else {
return XCTFail()
return XCTFail("Layer property \(text-color) should be set to a string.")
}
XCTAssertEqual(textColor, annotation.textColor.flatMap { $0.rgbaString })
}
Expand All @@ -321,7 +321,7 @@ final class PointAnnotationTests: XCTestCase {
}
guard case let .object(layerProperties) = featureProperties["layerProperties"],
case let .number(textHaloBlur) = layerProperties["text-halo-blur"] else {
return XCTFail()
return XCTFail("Layer property \(text-halo-blur) should be set to a number.")
}
XCTAssertEqual(textHaloBlur, annotation.textHaloBlur)
}
Expand All @@ -335,7 +335,7 @@ final class PointAnnotationTests: XCTestCase {
}
guard case let .object(layerProperties) = featureProperties["layerProperties"],
case let .string(textHaloColor) = layerProperties["text-halo-color"] else {
return XCTFail()
return XCTFail("Layer property \(text-halo-color) should be set to a string.")
}
XCTAssertEqual(textHaloColor, annotation.textHaloColor.flatMap { $0.rgbaString })
}
Expand All @@ -349,7 +349,7 @@ final class PointAnnotationTests: XCTestCase {
}
guard case let .object(layerProperties) = featureProperties["layerProperties"],
case let .number(textHaloWidth) = layerProperties["text-halo-width"] else {
return XCTFail()
return XCTFail("Layer property \(text-halo-width) should be set to a number.")
}
XCTAssertEqual(textHaloWidth, annotation.textHaloWidth)
}
Expand All @@ -363,7 +363,7 @@ final class PointAnnotationTests: XCTestCase {
}
guard case let .object(layerProperties) = featureProperties["layerProperties"],
case let .number(textOpacity) = layerProperties["text-opacity"] else {
return XCTFail()
return XCTFail("Layer property \(text-opacity) should be set to a number.")
}
XCTAssertEqual(textOpacity, annotation.textOpacity)
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ final class PolygonAnnotationTests: XCTestCase {
}
guard case let .object(layerProperties) = featureProperties["layerProperties"],
case let .number(fillSortKey) = layerProperties["fill-sort-key"] else {
return XCTFail()
return XCTFail("Layer property \(fill-sort-key) should be set to a number.")
}
XCTAssertEqual(fillSortKey, annotation.fillSortKey)
}
Expand All @@ -41,7 +41,7 @@ final class PolygonAnnotationTests: XCTestCase {
}
guard case let .object(layerProperties) = featureProperties["layerProperties"],
case let .string(fillColor) = layerProperties["fill-color"] else {
return XCTFail()
return XCTFail("Layer property \(fill-color) should be set to a string.")
}
XCTAssertEqual(fillColor, annotation.fillColor.flatMap { $0.rgbaString })
}
Expand All @@ -62,7 +62,7 @@ final class PolygonAnnotationTests: XCTestCase {
}
guard case let .object(layerProperties) = featureProperties["layerProperties"],
case let .number(fillOpacity) = layerProperties["fill-opacity"] else {
return XCTFail()
return XCTFail("Layer property \(fill-opacity) should be set to a number.")
}
XCTAssertEqual(fillOpacity, annotation.fillOpacity)
}
Expand All @@ -83,7 +83,7 @@ final class PolygonAnnotationTests: XCTestCase {
}
guard case let .object(layerProperties) = featureProperties["layerProperties"],
case let .string(fillOutlineColor) = layerProperties["fill-outline-color"] else {
return XCTFail()
return XCTFail("Layer property \(fill-outline-color) should be set to a string.")
}
XCTAssertEqual(fillOutlineColor, annotation.fillOutlineColor.flatMap { $0.rgbaString })
}
Expand All @@ -104,7 +104,7 @@ final class PolygonAnnotationTests: XCTestCase {
}
guard case let .object(layerProperties) = featureProperties["layerProperties"],
case let .string(fillPattern) = layerProperties["fill-pattern"] else {
return XCTFail()
return XCTFail("Layer property \(fill-pattern) should be set to a string.")
}
XCTAssertEqual(fillPattern, annotation.fillPattern)
}
Expand Down
Loading

0 comments on commit ed429ce

Please sign in to comment.