Skip to content

Commit

Permalink
Merge pull request swiftlang#25933 from mikeash/uiviewcontrolleraddit…
Browse files Browse the repository at this point in the history
…ions-test-folder-fix

[Test] Adjust UIViewControllerAdditions to take individual nib files as arguments rather than the enclosing folder.
  • Loading branch information
mikeash authored Jul 2, 2019
2 parents 4a5c1a0 + e0031d0 commit 5cf7ce7
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions test/stdlib/UIViewControllerAdditions.swift
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// RxUN: %target-build-swift -g %s -o %t/ViewControllerAdditions.out
// RxUN: %target-run %t/ViewControllerAdditions.out %S/Inputs/UIViewControllerAdditions | %FileCheck %s
// RUN: %target-run-simple-swift %S/Inputs/UIViewControllerAdditions | %FileCheck %s
// RxUN: %target-run %t/ViewControllerAdditions.out %S/Inputs/UIViewControllerAdditions/* | %FileCheck %s
// RUN: %target-run-simple-swift %S/Inputs/UIViewControllerAdditions/* | %FileCheck %s
// REQUIRES: executable_test

// REQUIRES: OS=ios
Expand Down Expand Up @@ -28,7 +28,9 @@ class View6Controller : UIViewController { }
// no nib
class MissingViewController : UIViewController { }

let bundle = Bundle(path: CommandLine.arguments[1])
let nsarg1 = CommandLine.arguments[1] as NSString
let bundlePath = nsarg1.deletingLastPathComponent
let bundle = Bundle(path: bundlePath)

let v1 = View1Controller(nibName:nil, bundle:bundle)
print("tag 1 0=\(v1.view.tag) you're it")
Expand Down

0 comments on commit 5cf7ce7

Please sign in to comment.