mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
I had to XFAIL test/ClangModules/cf.swift, which is failing for reasons I can't understand. <rdar://problem/16911496> Swift SVN r18071
25 lines
770 B
Swift
25 lines
770 B
Swift
// RUN: %target-run-simple-swift | FileCheck %s
|
|
|
|
//===----------------------------------------------------------------------===//
|
|
// String Splits
|
|
//===----------------------------------------------------------------------===//
|
|
if true {
|
|
var (before, after, found) = "foo.bar"._splitFirst(".")
|
|
assert(found)
|
|
assert(before == "foo")
|
|
assert(after == "bar")
|
|
}
|
|
|
|
// CHECK: OKAY
|
|
println("OKAY")
|
|
|
|
//===----------------------------------------------------------------------===//
|
|
// String uppercase/lowercase
|
|
//===----------------------------------------------------------------------===//
|
|
if true {
|
|
// CHECK-NEXT: {{^}}FOOBAR.WIBBLE{{$}}
|
|
println("FooBar.Wibble".uppercaseString)
|
|
// CHECK-NEXT: {{^}}foobar.wibble{{$}}
|
|
println("FooBar.Wibble".lowercaseString)
|
|
}
|