Skip to content

Commit

Permalink
Adopt Example wrapper
Browse files Browse the repository at this point in the history
  • Loading branch information
lordzsolt committed Feb 3, 2020
1 parent 2d265e7 commit 5da9770
Showing 1 changed file with 17 additions and 17 deletions.
34 changes: 17 additions & 17 deletions Tests/SwiftLintFrameworkTests/EmptyCountRuleTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -10,25 +10,25 @@ class EmptyCountRuleTests: XCTestCase {
func testEmptyCountWithOnlyAfterDot() {
// Test with `only_after_dot` set to true
let nonTriggeringExamples = [
"var count = 0\n",
"[Int]().isEmpty\n",
"[Int]().count > 1\n",
"[Int]().count == 1\n",
"[Int]().count == 0xff\n",
"[Int]().count == 0b01\n",
"[Int]().count == 0o07\n",
"discount == 0\n",
"order.discount == 0\n",
"count == 0\n"
Example("var count = 0\n"),
Example("[Int]().isEmpty\n"),
Example("[Int]().count > 1\n"),
Example("[Int]().count == 1\n"),
Example("[Int]().count == 0xff\n"),
Example("[Int]().count == 0b01\n"),
Example("[Int]().count == 0o07\n"),
Example("discount == 0\n"),
Example("order.discount == 0\n"),
Example("count == 0\n")
]
let triggeringExamples = [
"[Int]().↓count == 0\n",
"[Int]().↓count > 0\n",
"[Int]().↓count != 0\n",
"[Int]().↓count == 0x0\n",
"[Int]().↓count == 0x00_00\n",
"[Int]().↓count == 0b00\n",
"[Int]().↓count == 0o00\n"
Example("[Int]().↓count == 0\n"),
Example("[Int]().↓count > 0\n"),
Example("[Int]().↓count != 0\n"),
Example("[Int]().↓count == 0x0\n"),
Example("[Int]().↓count == 0x00_00\n"),
Example("[Int]().↓count == 0b00\n"),
Example("[Int]().↓count == 0o00\n")
]

let description = EmptyCountRule.description
Expand Down

0 comments on commit 5da9770

Please sign in to comment.