Files
swift-mirror/test/Interpreter/SDK/Foundation_NSLog.swift
2016-09-02 21:36:45 -07:00

23 lines
681 B
Swift

// RUN: rm -rf %t && mkdir -p %t
// RUN: echo 'void testNSLog();' > %t/NSLogIsWorking.h
// RUN: echo '@import Foundation; void testNSLog() { NSLog(@"working"); }' | %target-clang -fobjc-arc -fmodules -x objective-c - -c -o %t/NSLogIsWorking.o
// RUN: %target-build-swift %s %t/NSLogIsWorking.o -import-objc-header %t/NSLogIsWorking.h -o %t/main
// RUN: %target-run %t/main 2>%t/output.txt
// RUN: %FileCheck %s < %t/output.txt
// REQUIRES: executable_test
// REQUIRES: objc_interop
import Foundation
// CHECK: working
testNSLog()
// CHECK: 1 is the loneliest number that you'll ever do
NSLog(
"%@ is the loneliest number that you'll ever %@",
NSNumber(value: 1), "do"
)