Skip to content

Commit ddaa3be

Browse files
committed
Verify The Entire Compilation Session
The old tests were just running the type checker because we used to only emit reference dependencies after Sema. Now that we emit them after the pipeline has run, let's upgrade these tests to capture these new references.
1 parent fc7bdf8 commit ddaa3be

File tree

4 files changed

+10
-4
lines changed

4 files changed

+10
-4
lines changed

test/Incremental/Verifier/multi-file-private/Inputs/Derived.swift

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,21 @@
11
final public class OpenSubclass: OpenBase {} // expected-provides {{OpenSubclass}} expected-private-superclass {{main.OpenBase}}
22
// expected-provides {{OpenBase}}
33
// expected-private-member {{main.OpenBase.init}}
4+
// expected-private-member {{main.OpenBase.deinit}}
45
// expected-private-member {{main.OpenSubclass.init}}
56
// expected-private-member {{main.OpenSubclass.deinit}}
67

78
final public class PublicSubclass: PublicBase {} // expected-provides {{PublicSubclass}} expected-private-superclass {{main.PublicBase}}
89
// expected-provides {{PublicBase}}
910
// expected-private-member {{main.PublicBase.init}}
11+
// expected-private-member {{main.PublicBase.deinit}}
1012
// expected-private-member {{main.PublicSubclass.init}}
1113
// expected-private-member {{main.PublicSubclass.deinit}}
1214

1315
final internal class InternalSubclass: InternalBase {} // expected-provides {{InternalSubclass}} expected-private-superclass {{main.InternalBase}}
1416
// expected-provides {{InternalBase}}
1517
// expected-private-member {{main.InternalBase.init}}
18+
// expected-private-member {{main.InternalBase.deinit}}
1619
// expected-private-member {{main.InternalSubclass.init}}
1720
// expected-private-member {{main.InternalSubclass.deinit}}
1821

test/Incremental/Verifier/multi-file-private/main.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
// RUN: %empty-directory(%t)
22
// RUN: %{python} %S/../gen-output-file-map.py -o %t %S/Inputs -r %t.resp
3-
// RUN: cd %t && %target-swiftc_driver -typecheck -output-file-map %t/output.json -incremental -module-name main -experimental-private-intransitive-dependencies -verify-incremental-dependencies @%t.resp
4-
// RUN: cd %t && %target-swiftc_driver -typecheck -output-file-map %t/output.json -incremental -enable-batch-mode -module-name main -experimental-private-intransitive-dependencies -verify-incremental-dependencies @%t.resp
3+
// RUN: cd %t && %target-swiftc_driver -c -output-file-map %t/output.json -incremental -module-name main -experimental-private-intransitive-dependencies -verify-incremental-dependencies @%t.resp
4+
// RUN: cd %t && %target-swiftc_driver -c -output-file-map %t/output.json -incremental -enable-batch-mode -module-name main -experimental-private-intransitive-dependencies -verify-incremental-dependencies @%t.resp
55

66
// N.B. These tests are meant to continue to expand to more and more input files
77
// as more kinds of cross-type dependencies are discovered. This will naturally

test/Incremental/Verifier/multi-file/Inputs/Derived.swift

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,21 @@
11
final public class OpenSubclass: OpenBase {} // expected-provides {{OpenSubclass}} expected-cascading-superclass {{main.OpenBase}}
22
// expected-provides {{OpenBase}}
33
// expected-cascading-member {{main.OpenBase.init}}
4+
// expected-private-member {{main.OpenBase.deinit}}
45
// expected-cascading-member {{main.OpenSubclass.init}}
56
// expected-private-member {{main.OpenSubclass.deinit}}
67

78
final public class PublicSubclass: PublicBase {} // expected-provides {{PublicSubclass}} expected-cascading-superclass {{main.PublicBase}}
89
// expected-provides {{PublicBase}}
910
// expected-cascading-member {{main.PublicBase.init}}
11+
// expected-private-member {{main.PublicBase.deinit}}
1012
// expected-cascading-member {{main.PublicSubclass.init}}
1113
// expected-private-member {{main.PublicSubclass.deinit}}
1214

1315
final internal class InternalSubclass: InternalBase {} // expected-provides {{InternalSubclass}} expected-cascading-superclass {{main.InternalBase}}
1416
// expected-provides {{InternalBase}}
1517
// expected-cascading-member {{main.InternalBase.init}}
18+
// expected-private-member {{main.InternalBase.deinit}}
1619
// expected-cascading-member {{main.InternalSubclass.init}}
1720
// expected-private-member {{main.InternalSubclass.deinit}}
1821

test/Incremental/Verifier/multi-file/main.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
// RUN: %empty-directory(%t)
22
// RUN: %{python} %S/../gen-output-file-map.py -o %t %S/Inputs -r %t.resp
3-
// RUN: cd %t && %target-swiftc_driver -typecheck -output-file-map %t/output.json -incremental -module-name main -verify-incremental-dependencies @%t.resp
4-
// RUN: cd %t && %target-swiftc_driver -typecheck -output-file-map %t/output.json -incremental -enable-batch-mode -module-name main -verify-incremental-dependencies @%t.resp
3+
// RUN: cd %t && %target-swiftc_driver -c -output-file-map %t/output.json -incremental -module-name main -verify-incremental-dependencies @%t.resp
4+
// RUN: cd %t && %target-swiftc_driver -c -output-file-map %t/output.json -incremental -enable-batch-mode -module-name main -verify-incremental-dependencies @%t.resp
55

66
// N.B. These tests are meant to continue to expand to more and more input files
77
// as more kinds of cross-type dependencies are discovered. This will naturally

0 commit comments

Comments
 (0)