Skip to content

Commit a8bb856

Browse files
committed
[Stats] Expand -trace-stats-events test to cover recent work.
1 parent 712da1f commit a8bb856

File tree

1 file changed

+19
-1
lines changed

1 file changed

+19
-1
lines changed

test/Misc/stats_dir_tracer.swift

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,26 @@
22
// RUN: %target-swiftc_driver -o %t/main -module-name main -stats-output-dir %t %s -trace-stats-events
33
// RUN: %FileCheck -input-file %t/*.csv %s
44

5-
// CHECK: {{"Sema.NumTypesDeserialized"}}
5+
// CHECK: {{[0-9]+,[0-9]+,"exit","check-conformance","Sema.NominalTypeLookupDirectCount",[0-9]+,[0-9]+,"<conformance Bar : Proto>","\[.*stats_dir_tracer.swift:21:1 - line:27:1\]"}}
6+
// CHECK: {{[0-9]+,[0-9]+,"exit","typecheck-fn","Sema.NumTypesDeserialized",[0-9]+,[0-9]+,"foo\(\)","\[.*stats_dir_tracer.swift:9:8 - line:11:1\]"}}
7+
// CHECK: {{[0-9]+,[0-9]+,"exit","typecheck-decl","Sema.NumConstraintScopes",[0-9]+,[0-9]+,"<pattern binding>","\[.*stats_dir_tracer.swift:23:5 - line:23:13\]"}}
68

79
public func foo() {
810
print("hello")
911
}
12+
13+
protocol Proto {
14+
func bar() -> Int;
15+
}
16+
17+
class Bar {
18+
typealias T = Int
19+
}
20+
21+
extension Bar : Proto {
22+
func bar() -> T {
23+
let x = 1
24+
let y = Int(1.0)
25+
return x + y
26+
}
27+
}

0 commit comments

Comments
 (0)