forked from intitni/CopilotForXcode
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathRemoveContinuousSpacesInCodeTests.swift
More file actions
33 lines (28 loc) · 1.04 KB
/
RemoveContinuousSpacesInCodeTests.swift
File metadata and controls
33 lines (28 loc) · 1.04 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
import XCTest
@testable import Service
class RemoveContinuousSpacesInCodeTests: XCTestCase {
func test_remove_continuous_spaces_in_code_empty_string() {
let input = ""
let expectedOutput = ""
let output = removeContinuousSpaces(from: input)
XCTAssertEqual(output, expectedOutput)
}
func test_remove_continuous_spaces_in_code_blank_string() {
let input = " "
let expectedOutput = ""
let output = removeContinuousSpaces(from: input)
XCTAssertEqual(output, expectedOutput)
}
func test_remove_continuous_spaces() {
let input = "hello world"
let expectedOutput = "hello world"
let output = removeContinuousSpaces(from: input)
XCTAssertEqual(output, expectedOutput)
}
func test_remove_continuous_spaces_without_continuous_spaces() {
let input = "hello world"
let expectedOutput = "hello world"
let output = removeContinuousSpaces(from: input)
XCTAssertEqual(output, expectedOutput)
}
}