mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
* Group tests for profiling instrumentation together, NFC This will make it easier to test changes to the code coverage logic. There are a handful of tests which relate to profiling which I have not moved. These include tests for the driver and for the SIL optimizer. It makes more sense to keep those tests where they are. * Rename a test file, NFC This file tests code coverage of primary files, so I've changed the name of the file to reflect that. * Simplify the check lines in a test, NFC This file tests code coverage of closures. It had several check lines which obscured the meaning of the test, and its check lines were in a strange order. Remove the extra checks and disable -emit-sorted-sil.
18 lines
661 B
Swift
18 lines
661 B
Swift
// RUN: %target-swift-frontend -Xllvm -sil-full-demangle -profile-generate -profile-coverage-mapping -emit-sil -module-name coverage_curry %s | %FileCheck %s
|
|
|
|
struct S0 {
|
|
init(a: Int, b: Int) { }
|
|
func f1(a: Int, b: Int) -> Int { return a }
|
|
}
|
|
|
|
// CHECK-LABEL: sil_coverage_map {{.*}}// coverage_curry.testS0CurriedInstanceMethods(s0: coverage_curry.S0, a: Swift.Int, b: Swift.Int)
|
|
// CHECK-NEXT: [[@LINE+2]]:59 -> [[@LINE+8]]:2 : 0
|
|
// CHECK-NEXT: }
|
|
func testS0CurriedInstanceMethods(s0: S0, a: Int, b: Int) {
|
|
_ = S0.f1(s0)(a: a, b: a)
|
|
_ = (S0.f1)(s0)(a: a, b: a)
|
|
_ = ((S0.f1))(s0)(a: a, b: a)
|
|
_ = S0.f1(a:b:)(s0)(a, b)
|
|
let f1OneLevel = S0.f1(s0)
|
|
}
|