forked from swiftlang/swift
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcoverage_class.swift
30 lines (26 loc) · 906 Bytes
/
coverage_class.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
// RUN: %target-swift-frontend -Xllvm -sil-full-demangle -profile-generate -profile-coverage-mapping -emit-sil -module-name coverage_class %s | %FileCheck %s
class C {
// CHECK-LABEL: sil_coverage_map {{.*}}// coverage_class.C.foo
func foo() {}
// CHECK-LABEL: sil_coverage_map {{.*}}// coverage_class.C.__allocating_init
init() {}
// CHECK-LABEL: sil_coverage_map {{.*}}// coverage_class.C.__deallocating_deinit
deinit {}
}
extension C {
// CHECK-LABEL: sil_coverage_map {{.*}}// coverage_class.C.bar
func bar() {}
}
struct S {
// CHECK-LABEL: sil_coverage_map {{.*}}// coverage_class.S.foo
func foo() {}
// CHECK-LABEL: sil_coverage_map {{.*}}// coverage_class.S.init
init() {}
}
enum E {
case X, Y, Z
// CHECK-LABEL: sil_coverage_map {{.*}}// coverage_class.E.foo
func foo() {}
// CHECK-LABEL: sil_coverage_map {{.*}}// coverage_class.E.init
init() { self = .Y }
}