diff --git a/test/Utils/update-verify-tests/remarks.swift b/test/Utils/update-verify-tests/remarks.swift new file mode 100644 index 00000000000..b9981e7dcdc --- /dev/null +++ b/test/Utils/update-verify-tests/remarks.swift @@ -0,0 +1,21 @@ +// RUN: %empty-directory(%t) +// RUN: split-file %s %t + +// RUN: not %target-swift-frontend-verify -typecheck %t/test.swift -Rmodule-api-import 2>%t/output.txt +// RUN: %update-verify-tests < %t/output.txt +// RUN: %target-swift-frontend-verify -typecheck %t/test.swift -Rmodule-api-import +// RUN: %diff %t/test.swift %t/test.swift.expected + +//--- test.swift +public typealias Foo = String + +public typealias Bar = Optional // expected-remark@+1{{asdf}} + +//--- test.swift.expected +// expected-remark@+1{{struct 'String' is imported via 'Swift'}} +public typealias Foo = String + +// expected-remark@+2{{struct 'Int' is imported via 'Swift'}} +// expected-remark@+1{{generic enum 'Optional' is imported via 'Swift'}} +public typealias Bar = Optional + diff --git a/utils/update_verify_tests/core.py b/utils/update_verify_tests/core.py index a07573fc469..f076374d871 100644 --- a/utils/update_verify_tests/core.py +++ b/utils/update_verify_tests/core.py @@ -185,7 +185,7 @@ class ExpansionDiagClose: expected_diag_re = re.compile( - r"//(\s*)expected-([a-zA-Z-]*)(note|warning|error)(-re)?(@[+-]?\d+)?(:\d+)?(\s*)(\d+)?\{\{(.*)\}\}" + r"//(\s*)expected-([a-zA-Z-]*)(note|warning|error|remark)(-re)?(@[+-]?\d+)?(:\d+)?(\s*)(\d+)?\{\{(.*)\}\}" ) expected_expansion_diag_re = re.compile( r"//(\s*)expected-([a-zA-Z-]*)(expansion)(-re)?(@[+-]?\d+)(:\d+)(\s*)(\d+)?\{\{(.*)"