mirror of
https://github.com/apple/swift.git
synced 2026-02-27 18:26:24 +01:00
Such tests would fail with the -allow-unused-prefixes FileCheck option. diff --git a/test/lit.cfg b/test/lit.cfg -run_filecheck = '%s %s --sanitize BUILD_DIR=%s --sanitize SOURCE_DIR=%s --use-filecheck %s %s' % ( +run_filecheck = '%s %s --sanitize BUILD_DIR=%s --sanitize SOURCE_DIR=%s --use-filecheck %s %s -allow-unused-prefixes=false' % ( It helps avoiding some wrong CHECK patterns. I just looked briefly at some of the fails. TODO: fix remaining tests, too. rdar://74189761
47 lines
1.6 KiB
Swift
47 lines
1.6 KiB
Swift
// RUN: %empty-directory(%t)
|
|
// RUN: %target-swift-frontend -emit-module -o %t/Test.swiftmodule -emit-module-interface-path %t/Test.swiftinterface -module-name Test -enable-experimental-concurrency %s
|
|
// RUN: %FileCheck %s < %t/Test.swiftinterface
|
|
// RUN: %target-swift-frontend -typecheck-module-from-interface -module-name Test %t/Test.swiftinterface
|
|
|
|
// RUN: %target-swift-frontend -emit-module -o /dev/null -merge-modules %t/Test.swiftmodule -disable-objc-attr-requires-foundation-module -emit-module-interface-path %t/TestFromModule.swiftinterface -module-name Test -enable-experimental-concurrency
|
|
// RUN: %FileCheck %s < %t/TestFromModule.swiftinterface
|
|
// RUN: %target-swift-frontend -typecheck-module-from-interface -module-name Test %t/TestFromModule.swiftinterface
|
|
|
|
// REQUIRES: concurrency
|
|
|
|
// CHECK: public actor SomeActor
|
|
public actor SomeActor {
|
|
@actorIndependent func maine() { }
|
|
}
|
|
|
|
// CHECK: @globalActor public struct SomeGlobalActor
|
|
@globalActor
|
|
public struct SomeGlobalActor {
|
|
public static let shared = SomeActor()
|
|
}
|
|
|
|
// CHECK: @{{(Test.)?}}SomeGlobalActor public protocol P1
|
|
// CHECK-NEXT: @{{(Test.)?}}SomeGlobalActor func method()
|
|
@SomeGlobalActor
|
|
public protocol P1 {
|
|
func method()
|
|
}
|
|
|
|
// CHECK: class C1
|
|
// CHECK-NEXT: @{{(Test.)?}}SomeGlobalActor public func method()
|
|
public class C1: P1 {
|
|
public func method() { }
|
|
}
|
|
|
|
@SomeGlobalActor
|
|
public class C2 { }
|
|
|
|
// CHECK: @{{(Test.)?}}SomeGlobalActor public class C2
|
|
public class C3: C2 { }
|
|
|
|
// CHECK: public actor SomeSubActor
|
|
// CHECK-NEXT: @actorIndependent public func maine()
|
|
public actor SomeSubActor: SomeActor {
|
|
override public func maine() { }
|
|
}
|