Skip to content

Commit bb95192

Browse files
author
Sean Henry
committed
Adds acceptance test for parsing open keyword as function name
1 parent e2584ed commit bb95192

File tree

2 files changed

+7
-0
lines changed

2 files changed

+7
-0
lines changed

TestProject/Keywords.swift

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,5 @@ protocol Keywords { // Keywords found: https://developer.apple.com/library/conte
66
func declarations(associatedtype: Int, class: Int, deinit: Int, enum: Int, extension: Int, fileprivate: Int, func: Int, import: Int, init: Int, `inout`: Int, internal: Int, `let`: Int, open: Int, operator: Int, private: Int, protocol: Int, public: Int, static: Int, struct: Int, subscript: Int, typealias: Int, `var`: Int)
77
func expressionsAndTypes(as: Int, Any: Int, catch: Int, false: Int, is: Int, nil: Int, rethrows: Int, super: Int, Self: Int, throw: Int, throws: Int, true: Int, try: Int)
88
func reserved(associativity: Int, convenience: Int, dynamic: Int, didSet: Int, final: Int, get: Int, infix: Int, indirect: Int, lazy: Int, left: Int, mutating: Int, none: Int, nonmutating: Int, optional: Int, override: Int, postfix: Int, precedence: Int, prefix: Int, Protocol: Int, required: Int, right: Int, set: Int, Type: Int, unowned: Int, weak: Int, willSet: Int)
9+
func open() {}
910
}

TestProject/KeywordsMock_expected.swift

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,4 +81,10 @@ class KeywordsMock: Keywords {
8181
invokedReservedParameters = (associativity, convenience, dynamic, didSet, final, get, infix, indirect, lazy, left, mutating, none, nonmutating, optional, override, postfix, precedence, prefix, Protocol, required, right, set, Type, unowned, weak, willSet)
8282
invokedReservedParametersList.append((associativity, convenience, dynamic, didSet, final, get, infix, indirect, lazy, left, mutating, none, nonmutating, optional, override, postfix, precedence, prefix, Protocol, required, right, set, Type, unowned, weak, willSet))
8383
}
84+
var invokedOpen = false
85+
var invokedOpenCount = 0
86+
func open() {
87+
invokedOpen = true
88+
invokedOpenCount += 1
89+
}
8490
}

0 commit comments

Comments
 (0)