I wrote simple test:
func testTabs() {
let tabbed = "\t"
let spaced = " "
XCTAssert(tabbed == spaced, "Comparison is illegal")
}
func testTabs() {
let tabbed = "\t"
let tab = " "
XCTAssert(tabbed == tab, "Comparison is illegal")
}
if fails for using actual 'tab' spacing, it fails for 4 spaces,2 spaces. So I compare tab for \t and it fails. ( also fails for any equivalent).
Should it work at all? Should I never use tab in strings if I want do the tests? Let me show what I mean:
func generateSomeString() -> String {
let array = ["Some","Stupid","People","Don't","Read","But","Comment"]
let string = array.joined(separator: "\t")
return string
}
func testStrings() {
let string = generateSomeString()
let expectedString = "Some Stupid People Don't Read But Comment"
print(string)
XCTAssert(string == expectedString, "Comparison is illegal")
}