Files
swift-mirror/test/SourceKit/CodeComplete/complete_operators.swift
Argyrios Kyrtzidis 8ff6a98a99 [sourcekit] Merge SourceKit into the Swift repo.
The code goes into its own sub-tree under 'tools' but tests go under 'test',
so that running 'check-swift' will also run all the SourceKit tests.

SourceKit is disabled on non-darwin platforms.
2015-11-05 01:09:08 -08:00

43 lines
1.1 KiB
Swift

// RUN: %complete-test -tok=INT_OPERATORS %s | FileCheck %s
// RUN: %complete-test -add-inner-results -tok=INT_OPERATORS_INNER %s | FileCheck %s -check-prefix=INNER
// RUN: %complete-test -raw -hide-none -tok=INT_OPERATORS %s | FileCheck %s -check-prefix=RAW
let xxxx = 1
func test1(var x: Int) {
x#^INT_OPERATORS^#
}
// CHECK: .
// CHECK: !=
// CHECK: +
// CHECK: ++
func test2(var x: Int) {
#^INT_OPERATORS_INNER,x^#
}
// INNER: x.
// INNER: x+
// INNER: x++
// INNER: xxxx
// INNER: x.bigEndian
// RAW: {
// RAW: key.kind: source.lang.swift.decl.function.operator.infix,
// RAW: key.name: "!=",
// RAW: key.sourcetext: " != <#T##Int#>",
// RAW: key.description: "!=",
// RAW: key.typename: "Bool",
// RAW: {
// RAW: key.kind: source.lang.swift.decl.function.operator.infix,
// RAW: key.name: "+",
// RAW: key.sourcetext: " + <#T##Int#>",
// RAW: key.description: "+",
// RAW: key.typename: "Int",
// RAW: },
// RAW: {
// RAW: key.kind: source.lang.swift.decl.function.operator.postfix,
// RAW: key.name: "++",
// RAW: key.sourcetext: "++",
// RAW: key.description: "++",
// RAW: key.typename: "Int",
// RAW: },