test added for the "inout" keyword
This commit is contained in:
parent
b742c3cfa3
commit
ea71fd7191
@ -493,6 +493,31 @@ final class DeclarationTests: SyntaxHighlighterTestCase {
|
|||||||
.plainText("}")
|
.plainText("}")
|
||||||
])
|
])
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func testFunctionDeclarationWithInOutParameter() {
|
||||||
|
let components = highlighter.highlight("func swapValues(value1: inout Int, value2: inout Int) { }")
|
||||||
|
|
||||||
|
XCTAssertEqual(components, [
|
||||||
|
.token("func", .keyword),
|
||||||
|
.whitespace(" "),
|
||||||
|
.plainText("swapValues(value1:"),
|
||||||
|
.whitespace(" "),
|
||||||
|
.token("inout", .keyword),
|
||||||
|
.whitespace(" "),
|
||||||
|
.token("Int", .type),
|
||||||
|
.plainText(","),
|
||||||
|
.whitespace(" "),
|
||||||
|
.plainText("value2:"),
|
||||||
|
.whitespace(" "),
|
||||||
|
.token("inout", .keyword),
|
||||||
|
.whitespace(" "),
|
||||||
|
.token("Int", .type),
|
||||||
|
.whitespace(" "),
|
||||||
|
.plainText("{"),
|
||||||
|
.whitespace(" "),
|
||||||
|
.plainText("}")
|
||||||
|
])
|
||||||
|
}
|
||||||
|
|
||||||
func testAllTestsRunOnLinux() {
|
func testAllTestsRunOnLinux() {
|
||||||
XCTAssertTrue(TestCaseVerifier.verifyLinuxTests((type(of: self)).allTests))
|
XCTAssertTrue(TestCaseVerifier.verifyLinuxTests((type(of: self)).allTests))
|
||||||
|
Loading…
x
Reference in New Issue
Block a user