Skip to content

[test] Clean up overlooked dead test files and bring back accidentally deleted test after... #81355

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
May 7, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 0 additions & 10 deletions test/FixCode/Inputs/batch-mode-helper.swift

This file was deleted.

1 change: 0 additions & 1 deletion test/FixCode/Inputs/module.modulemap

This file was deleted.

8 changes: 0 additions & 8 deletions test/FixCode/Inputs/t1.swift

This file was deleted.

8 changes: 0 additions & 8 deletions test/FixCode/Inputs/t1.swift.result

This file was deleted.

8 changes: 0 additions & 8 deletions test/FixCode/Inputs/t2.swift

This file was deleted.

8 changes: 0 additions & 8 deletions test/FixCode/Inputs/t2.swift.result

This file was deleted.

44 changes: 44 additions & 0 deletions test/Parse/if-else-invalid.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
// RUN: %target-swift-frontend -parse -verify %s

// No more diags expected during Sema.
// RUN: %target-typecheck-verify-swift

do {
func something() -> Bool {}
func foo() {}

do {
if something() {
// expected-error@+1:11 {{expected '{' or 'if' after 'else'}}{{none}}
} else
}

do {
if something() {
// expected-error@+1:11 {{expected '{' or 'if' after 'else'}}{{none}}
} else
foo()
}

do {
if something() {
// expected-error@+1:7 {{expected '{' or 'if' after 'else'; did you mean to write 'if'?}}{{11-11= if}}
} else something() { // Fix-it because all on one line.
}
}

do {
if something() {
// expected-error@+1:12 {{expected '{' or 'if' after 'else'}}{{none}}
} else something()
{
}
}

do {
if something() {
// expected-error@+1:12 {{expected '{' or 'if' after 'else'}}{{none}}
} else something()
foo1()
}
}