Skip to content

Commit ff3ea64

Browse files
kavonslavapestov
authored andcommitted
NCGenerics: increase baseline test coverage
During feature bringup, it's handy to have tests always running in CI to prevent outside regressions.
1 parent f296d8e commit ff3ea64

33 files changed

+77
-5
lines changed

test/Concurrency/transfernonsendable_instruction_matching.sil

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
// RUN: %target-sil-opt -transfer-non-sendable -enable-experimental-feature RegionBasedIsolation -strict-concurrency=complete %s -verify -o /dev/null
2+
// RUN: %target-sil-opt -enable-experimental-feature NoncopyableGenerics -transfer-non-sendable -enable-experimental-feature RegionBasedIsolation -strict-concurrency=complete %s -verify -o /dev/null
23

34
// REQUIRES: concurrency
45
// REQUIRES: asserts

test/Interpreter/currying_generics.swift

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
// RUN: %target-run-simple-swift | %FileCheck %s
2+
// RUN: %target-run-simple-swift -enable-experimental-feature NoncopyableGenerics | %FileCheck %s
3+
24
// REQUIRES: executable_test
35

46
func curry<T, U, V>(_ f: @escaping (T, U) -> V) -> (T) -> (U) -> V {
@@ -201,4 +203,3 @@ let pt3 = set(_1)(3)((1, 2))
201203
print(pt3) // CHECK-NEXT: (3, 2)
202204
let pt4 = view(_2)(("hello", 5))
203205
print(pt4) // CHECK-NEXT: 5
204-

test/Interpreter/existential_member_accesses_self_assoctype.swift

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
// RUN: %target-run-simple-swift
2+
// RUN: %target-run-simple-swift -enable-experimental-feature NoncopyableGenerics
23
// REQUIRES: executable_test
34

45
import StdlibUnittest

test/Interpreter/generic_casts.swift

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,15 @@
66
//
77
// RUN: %target-run %t/a.out | %FileCheck --check-prefix CHECK %s
88
// RUN: %target-run %t/a.out.optimized | %FileCheck --check-prefix CHECK %s
9+
10+
// RUN: %target-build-swift -enable-experimental-feature NoncopyableGenerics -Onone %s -o %t/a.out
11+
// RUN: %target-build-swift -enable-experimental-feature NoncopyableGenerics -O %s -o %t/a.out.optimized
12+
// RUN: %target-codesign %t/a.out
13+
// RUN: %target-codesign %t/a.out.optimized
14+
//
15+
// RUN: %target-run %t/a.out | %FileCheck --check-prefix CHECK %s
16+
// RUN: %target-run %t/a.out.optimized | %FileCheck --check-prefix CHECK %s
17+
918
// REQUIRES: executable_test
1019

1120
// FIXME: rdar://problem/19648117 Needs splitting objc parts out

test/Interpreter/generic_casts_objc.swift

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,14 @@
55
// RUN: %target-build-swift -O %s -o %t/a.out.optimized
66
// RUN: %target-codesign %t/a.out.optimized
77
// RUN: %target-run %t/a.out.optimized | %FileCheck %s
8+
9+
// RUN: %target-build-swift -enable-experimental-feature NoncopyableGenerics -Onone %s -o %t/a.out
10+
// RUN: %target-codesign %t/a.out
11+
// RUN: %target-run %t/a.out | %FileCheck %s
12+
// RUN: %target-build-swift -enable-experimental-feature NoncopyableGenerics -O %s -o %t/a.out.optimized
13+
// RUN: %target-codesign %t/a.out.optimized
14+
// RUN: %target-run %t/a.out.optimized | %FileCheck %s
15+
816
// REQUIRES: executable_test
917
// REQUIRES: objc_interop
1018

test/Interpreter/moveonly_address_maximize.swift

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
// RUN: %target-run-simple-swift(-Xfrontend -sil-verify-all -enable-experimental-feature MoveOnlyPartialConsumption) | %FileCheck %s
22
// RUN: %target-run-simple-swift(-O -Xfrontend -sil-verify-all -enable-experimental-feature MoveOnlyPartialConsumption) | %FileCheck %s
33

4+
// RUN: %target-run-simple-swift(-enable-experimental-feature NoncopyableGenerics -Xfrontend -sil-verify-all -enable-experimental-feature MoveOnlyPartialConsumption) | %FileCheck %s
5+
// RUN: %target-run-simple-swift(-enable-experimental-feature NoncopyableGenerics -O -Xfrontend -sil-verify-all -enable-experimental-feature MoveOnlyPartialConsumption) | %FileCheck %s
6+
47
// REQUIRES: executable_test
58

69
struct S : ~Copyable {
@@ -306,4 +309,3 @@ simpleTestVar6a(false)
306309
simpleTestVar6a(true)
307310
simpleTestVar6b(false)
308311
simpleTestVar6b(true)
309-

test/Interpreter/moveonly_bufferview.swift

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
// RUN: %target-run-simple-swift(-Xfrontend -sil-verify-all) | %FileCheck %s
22
// RUN: %target-run-simple-swift(-O -Xfrontend -sil-verify-all) | %FileCheck %s
33

4+
// RUN: %target-run-simple-swift(-enable-experimental-feature NoncopyableGenerics -Xfrontend -sil-verify-all) | %FileCheck %s
5+
// RUN: %target-run-simple-swift(-enable-experimental-feature NoncopyableGenerics -O -Xfrontend -sil-verify-all) | %FileCheck %s
6+
47
// REQUIRES: executable_test
58

69
public struct BufferView<T>: ~Copyable {

test/Interpreter/moveonly_computed_property_in_class.swift

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
// RUN: %target-run-simple-swift(-Xfrontend -sil-verify-all)
22
// RUN: %target-run-simple-swift(-O -Xfrontend -sil-verify-all)
33

4+
// RUN: %target-run-simple-swift(-enable-experimental-feature NoncopyableGenerics -Xfrontend -sil-verify-all)
5+
// RUN: %target-run-simple-swift(-enable-experimental-feature NoncopyableGenerics -O -Xfrontend -sil-verify-all)
6+
47
// REQUIRES: executable_test
58
@_moveOnly
69
struct FileDescriptor {

test/Interpreter/moveonly_consuming_param.swift

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
// RUN: %target-run-simple-swift | %FileCheck %s
22
// RUN: %target-run-simple-swift(-O -Xfrontend -sil-verify-all) | %FileCheck %s
33

4+
// RUN: %target-run-simple-swift -enable-experimental-feature NoncopyableGenerics | %FileCheck %s
5+
// RUN: %target-run-simple-swift(-enable-experimental-feature NoncopyableGenerics -O -Xfrontend -sil-verify-all) | %FileCheck %s
6+
47
// REQUIRES: executable_test
58

69
@_moveOnly

test/Interpreter/moveonly_deinit_autoclosure.swift

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
// RUN: %target-run-simple-swift
2+
// RUN: %target-run-simple-swift -enable-experimental-feature NoncopyableGenerics
3+
24
// REQUIRES: executable_test
35

46
internal func _myPrecondition(

0 commit comments

Comments
 (0)