Skip to content

Commit

Permalink
Adds acceptance test for parsing open keyword as function name
Browse files Browse the repository at this point in the history
  • Loading branch information
Sean Henry committed Jun 26, 2019
1 parent e2584ed commit bb95192
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
1 change: 1 addition & 0 deletions TestProject/Keywords.swift
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,5 @@ protocol Keywords { // Keywords found: https://developer.apple.com/library/conte
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)
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)
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)
func open() {}
}
6 changes: 6 additions & 0 deletions TestProject/KeywordsMock_expected.swift
Original file line number Diff line number Diff line change
Expand Up @@ -81,4 +81,10 @@ class KeywordsMock: Keywords {
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)
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))
}
var invokedOpen = false
var invokedOpenCount = 0
func open() {
invokedOpen = true
invokedOpenCount += 1
}
}

0 comments on commit bb95192

Please sign in to comment.