forked from swiftlang/swift
-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathcomplete_literal.swift
50 lines (44 loc) · 3.31 KB
/
complete_literal.swift
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=LITERAL1 | FileCheck %s -check-prefix=LITERAL1
// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=LITERAL2 | FileCheck %s -check-prefix=LITERAL2
// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=LITERAL3 | FileCheck %s -check-prefix=LITERAL3
// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=LITERAL4 | FileCheck %s -check-prefix=LITERAL4
{
1.#^LITERAL1^#
}
// LITERAL1: Begin completions
// LITERAL1-DAG: Decl[InstanceVar]/CurrNominal: bigEndian[#Int#]; name=bigEndian{{$}}
// LITERAL1-DAG: Decl[InstanceVar]/CurrNominal: littleEndian[#Int#]; name=littleEndian{{$}}
// LITERAL1-DAG: Decl[InstanceVar]/CurrNominal: byteSwapped[#Int#]; name=byteSwapped{{$}}
// LITERAL1-DAG: Decl[InstanceMethod]/CurrNominal: toIntMax()[#IntMax#]; name=toIntMax(){{$}}
{
1.1.#^LITERAL2^#
}
// LITERAL2: Begin completions
// LITERAL2-DAG: Decl[InstanceVar]/CurrNominal: isSignMinus[#Bool#]; name=isSignMinus{{$}}
// LITERAL2-DAG: Decl[InstanceVar]/CurrNominal: isNormal[#Bool#]; name=isNormal{{$}}
// LITERAL2-DAG: Decl[InstanceVar]/CurrNominal: isFinite[#Bool#]; name=isFinite{{$}}
// LITERAL2-DAG: Decl[InstanceVar]/CurrNominal: isZero[#Bool#]; name=isZero{{$}}
// LITERAL2-DAG: Decl[InstanceVar]/CurrNominal: isSubnormal[#Bool#]; name=isSubnormal{{$}}
// LITERAL2-DAG: Decl[InstanceVar]/CurrNominal: isInfinite[#Bool#]; name=isInfinite{{$}}
// LITERAL2-DAG: Decl[InstanceVar]/CurrNominal: isNaN[#Bool#]; name=isNaN{{$}}
{
true.#^LITERAL3^#
}
// LITERAL3: Begin completions
// LITERAL3-DAG: Decl[InstanceVar]/CurrNominal: boolValue[#Bool#]; name=boolValue{{$}}
// LITERAL3-DAG: Decl[InstanceVar]/CurrNominal: description[#String#]; name=description{{$}}
// LITERAL3-DAG: Decl[InstanceVar]/CurrNominal: hashValue[#Int#]; name=hashValue{{$}}
{
"swift".#^LITERAL4^#
}
// LITERAL4: Begin completions
// LITERAL4-DAG: Decl[InstanceMethod]/CurrNominal: withCString({#(f): UnsafePointer<Int8> throws -> Result##UnsafePointer<Int8> throws -> Result#})[' rethrows'][#Result#]; name=withCString(f: UnsafePointer<Int8> throws -> Result) rethrows{{$}}
// FIXME: we should show the qualified String.Index type.
// rdar://problem/20788802
// LITERAL4-DAG: Decl[InstanceVar]/CurrNominal: startIndex[#Index#]; name=startIndex{{$}}
// LITERAL4-DAG: Decl[InstanceVar]/CurrNominal: endIndex[#Index#]; name=endIndex{{$}}
// LITERAL4-DAG: Decl[InstanceMethod]/CurrNominal: append({#(c): Character#})[#Void#]; name=append(c: Character){{$}}
// LITERAL4-DAG: Decl[InstanceMethod]/CurrNominal: appendContentsOf({#(newElements): S#})[#Void#]; name=appendContentsOf(newElements: S){{$}}
// LITERAL4-DAG: Decl[InstanceMethod]/CurrNominal: insertContentsOf({#(newElements): S#}, {#at: Index#})[#Void#]; name=insertContentsOf(newElements: S, at: Index){{$}}
// LITERAL4-DAG: Decl[InstanceMethod]/CurrNominal: removeAtIndex({#(i): Index#})[#Character#]; name=removeAtIndex(i: Index){{$}}
// LITERAL4-DAG: Decl[InstanceVar]/CurrNominal: lowercaseString[#String#]; name=lowercaseString{{$}}