Files
swift-mirror/test/Utils/update-verify-tests/update-single-check.swift
Henrik G. Olsson 8bff12a580 [utils] port update-verify-tests to Swift's -verify
This ports clang's test suite for update-verify-tests from C to Swift,
and adjusts update-verify-tests as needed. The main differences are the
Swift -verify output format being quite different, as well as Swift's
'-verify-additional-prefix foo' working differently than clang's
'-verify=foo'.
2025-11-05 16:02:06 -08:00

20 lines
443 B
Swift

// RUN: %empty-directory(%t)
// RUN: split-file %s %t
// RUN: not %target-swift-frontend-verify -typecheck %t/test.swift 2>&1 | %update-verify-tests
// RUN: %target-swift-frontend-verify -typecheck %t/test.swift
// RUN: %diff %t/test.swift %t/test.swift.expected
//--- test.swift
func foo() {
// expected-error@+1{{AAA}}
bar = 2
}
//--- test.swift.expected
func foo() {
// expected-error@+1{{cannot find 'bar' in scope}}
bar = 2
}