Files
swift-mirror/test/Misc/stats_dir_profiler.swift
Daniel Rodríguez Troitiño b047f9e252 [windows] Provide %long-tmp in Windows for extended length temp paths.
In Windows %t might end up very close to the maximum path length of 260
characters. It is possible to use extended lenght paths with a \\?\
prefix. The changes introduce %long-tmp for cases that the test suite
is going over those limits and need a hint in Windows that the path
might be long. It expands to the same as %t in other platforms.

This should fix the test/Misc/stats_dir_profiler.swift in the Windows
VS 2017 CI machines and hopefully not affect anything else.
2020-10-11 12:47:09 -07:00

34 lines
1.0 KiB
Swift

// RUN: %empty-directory(%t)
// RUN: %empty-directory(%t/stats-events)
// RUN: %empty-directory(%t/stats-entities)
// RUN: %target-swiftc_driver -o %t/main -module-name main -stats-output-dir %t/stats-events %s -profile-stats-events
// RUN: %target-swiftc_driver -o %t/main -module-name main -stats-output-dir %t/stats-entities %s -profile-stats-entities
// Need to use %long-tmp because in Windows the * may expand to a path longer
// than 260 characters.
// RUN: %FileCheck -check-prefix=EVENTS -input-file %long-tmp/stats-events/*.dir/Time.User.events %s
// RUN: %FileCheck -check-prefix=ENTITIES -input-file %long-tmp/stats-entities/*.dir/Time.User.entities %s
// EVENTS: {{perform-sema;.*;typecheck-decl.* [0-9]+}}
// ENTITIES: {{perform-sema;.*;TypeCheckFunctionBodyRequest bar\(\);typecheck-stmt.* [0-9]+}}
public func foo() {
print("hello")
}
protocol Proto {
func bar() -> Int;
}
class Bar {
typealias T = Int
}
extension Bar : Proto {
func bar() -> T {
let x = 1
let y = Int(1.0)
return x + y
}
}