Files
swift-mirror/test/Interpreter/SDK/Foundation_NSLocalizedString.swift
Doug Gregor 06c5e9cd5b Enable "omit needless words" by default.
Most of this is in updating the standard library, SDK overlays, and
piles of test cases to use the new names. No surprises here, although
this shows us some potential heuristic tweaks.

There is one substantive compiler change that needs to be factored out
involving synthesizing calls to copyWithZone()/copy(zone:). Aside from
that, there are four failing tests:

    Swift :: ClangModules/objc_parse.swift
    Swift :: Interpreter/SDK/Foundation_test.swift
    Swift :: Interpreter/SDK/archiving_generic_swift_class.swift
    Swift :: Interpreter/SDK/objc_currying.swift

due to two independent remaining compiler bugs:
  * We're not getting partial ordering between NSCoder's
  encode(AnyObject, forKey: String) and NSKeyedArchiver's version of
  that method, and
  * Dynamic lookup (into AnyObject) doesn't know how to find the new
  names. We need the Swift name lookup tables enabled to address this.
2015-12-11 14:46:50 -08:00

19 lines
485 B
Swift
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
// RUN: %target-run-simple-swift | FileCheck %s
// REQUIRES: executable_test
// REQUIRES: objc_interop
import Foundation
let key = "inquiens"
let value = "λαμπερός"
let s1 = NSLocalizedString(key, comment: "Hello")
// CHECK: key = inquiens s1 = inquiens
print("key = \(key) s1 = \(s1)")
let s2 = NSLocalizedString(key, tableName:nil, bundle: NSBundle.main(), value: value, comment: "Hello")
// CHECK: key = inquiens s2 = λαμπερός
print("key = \(key) s2 = \(s2)")