Skip to content

[silgen] Add an extra swift-version 5 run to initializer tests. #31893

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
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
17 changes: 16 additions & 1 deletion test/Interpreter/convenience_init_peer_delegation.swift
Original file line number Diff line number Diff line change
@@ -1,14 +1,29 @@
// RUN: %empty-directory(%t)

//
// RUN: %target-build-swift %s -Xfrontend -disable-objc-attr-requires-foundation-module -o %t/main
// RUN: %target-codesign %t/main
// RUN: %target-run %t/main | %FileCheck %s

// RUN: %empty-directory(%t)
//
// RUN: sed -e 's/required//g' < %s > %t/without_required.swift
// RUN: %target-build-swift %t/without_required.swift -Xfrontend -disable-objc-attr-requires-foundation-module -o %t/without_required
// RUN: %target-codesign %t/without_required
// RUN: %target-run %t/without_required | %FileCheck %s

// RUN: %empty-directory(%t)
//
// RUN: %target-build-swift %s -Xfrontend -disable-objc-attr-requires-foundation-module -o %t/main -swift-version 5
// RUN: %target-codesign %t/main
// RUN: %target-run %t/main | %FileCheck %s

// RUN: %empty-directory(%t)
//
// RUN: sed -e 's/required//g' < %s > %t/without_required.swift
// RUN: %target-build-swift %t/without_required.swift -Xfrontend -disable-objc-attr-requires-foundation-module -o %t/without_required -swift-version 5
// RUN: %target-codesign %t/without_required
// RUN: %target-run %t/without_required | %FileCheck %s

// REQUIRES: executable_test
// REQUIRES: objc_interop
// XFAIL: CPU=arm64e
Expand Down
4 changes: 3 additions & 1 deletion test/Interpreter/failable_initializers.swift
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
// RUN: %target-run-simple-swift
// RUN: %target-run-simple-swift(-swift-version 4)
// RUN: %target-run-simple-swift(-swift-version 5)

// REQUIRES: executable_test

import StdlibUnittest
Expand Down
4 changes: 3 additions & 1 deletion test/Interpreter/initializers.swift
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
// RUN: %target-run-simple-swift | %FileCheck %s
// RUN: %target-run-simple-swift(-swift-version 4) | %FileCheck %s
// RUN: %target-run-simple-swift(-swift-version 5) | %FileCheck %s

// REQUIRES: executable_test

// Test initialization and initializer inheritance.
Expand Down
10 changes: 10 additions & 0 deletions test/Interpreter/objc_failable_initializers.swift
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,16 @@
// RUN: %target-codesign %t/a.out
// RUN: %target-run %t/a.out

// RUN: %empty-directory(%t)
//
// target-build-swift assumes we want -swift-version 4. Behavior in initializers
// changed in swift 5, so we want to explicitly check it as well.
//
// RUN: %target-clang -fobjc-arc %S/Inputs/ObjCClasses/ObjCClasses.m -c -o %t/ObjCClasses.o
// RUN: %target-build-swift -I %S/Inputs/ObjCClasses/ -Xlinker %t/ObjCClasses.o %s -o %t/a.out -swift-version 5
// RUN: %target-codesign %t/a.out
// RUN: %target-run %t/a.out

// REQUIRES: executable_test
// REQUIRES: objc_interop

Expand Down
10 changes: 9 additions & 1 deletion test/Interpreter/protocol_initializers.swift
Original file line number Diff line number Diff line change
@@ -1,8 +1,16 @@

// RUN: %empty-directory(%t)
// RUN: %target-build-swift -swift-version 5 %s -o %t/a.out
//
// RUN: %target-build-swift %s -o %t/a.out
// RUN: %target-codesign %t/a.out
// RUN: %target-run %t/a.out

// RUN: %empty-directory(%t)
//
// RUN: %target-build-swift -swift-version 5 %s -o %t/a.out
// RUN: %target-codesign %t/a.out
// RUN: %target-run %t/a.out

// REQUIRES: executable_test

import StdlibUnittest
Expand Down
8 changes: 3 additions & 5 deletions test/Interpreter/protocol_initializers_class.swift
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
// RUN: %empty-directory(%t)
// RUN: %target-build-swift -swift-version 5 %s -o %t/a.out
// RUN: %target-codesign %t/a.out
//
// RUN: %target-run %t/a.out
// RUN: %target-run-simple-swift(-swift-version 4)
// RUN: %target-run-simple-swift(-swift-version 5)

// REQUIRES: executable_test

import StdlibUnittest
Expand Down
4 changes: 3 additions & 1 deletion test/Interpreter/throwing_initializers.swift
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
// RUN: %target-run-simple-swift
// RUN: %target-run-simple-swift(-swift-version 4)
// RUN: %target-run-simple-swift(-swift-version 5)

// REQUIRES: executable_test

import StdlibUnittest
Expand Down