Skip to content

Update to support the latest Corelibs XCTest #270

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
merged 1 commit into from
Mar 2, 2016
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
2 changes: 1 addition & 1 deletion TestFoundation/TestNSAffineTransform.swift
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
class TestNSAffineTransform : XCTestCase {
private let accuracyThreshold = 0.001

var allTests : [(String, () throws -> Void)] {
static var allTests: [(String, TestNSAffineTransform -> () throws -> Void)] {
return [
("test_BasicConstruction", test_BasicConstruction),
("test_IdentityTransformation", test_IdentityTransformation),
Expand Down
2 changes: 1 addition & 1 deletion TestFoundation/TestNSArray.swift
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ import SwiftXCTest

class TestNSArray : XCTestCase {

var allTests : [(String, () throws -> Void)] {
static var allTests: [(String, TestNSArray -> () throws -> Void)] {
return [
("test_BasicConstruction", test_BasicConstruction),
("test_enumeration", test_enumeration),
Expand Down
2 changes: 1 addition & 1 deletion TestFoundation/TestNSBundle.swift
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@

class TestNSBundle : XCTestCase {

var allTests : [(String, () throws -> Void)] {
static var allTests: [(String, TestNSBundle -> () throws -> Void)] {
return [
("test_paths", test_paths),
("test_resources", test_resources),
Expand Down
2 changes: 1 addition & 1 deletion TestFoundation/TestNSByteCountFormatter.swift
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@

class TestNSByteCountFormatter : XCTestCase {

var allTests : [(String, () throws -> Void)] {
static var allTests: [(String, TestNSByteCountFormatter -> () throws -> Void)] {
return [
("test_DefaultValues", test_DefaultValues)
]
Expand Down
2 changes: 1 addition & 1 deletion TestFoundation/TestNSCalendar.swift
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ import CoreFoundation

class TestNSCalendar: XCTestCase {

var allTests : [(String, () throws -> Void)] {
static var allTests: [(String, TestNSCalendar -> () throws -> Void)] {
return [
("test_gettingDatesOnGregorianCalendar", test_gettingDatesOnGregorianCalendar ),
("test_gettingDatesOnHebrewCalendar", test_gettingDatesOnHebrewCalendar ),
Expand Down
2 changes: 1 addition & 1 deletion TestFoundation/TestNSCharacterSet.swift
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ import SwiftXCTest

class TestNSCharacterSet : XCTestCase {

var allTests : [(String, () throws -> Void)] {
static var allTests: [(String, TestNSCharacterSet -> () throws -> Void)] {
return [
("test_Predefines", test_Predefines),
("test_Range", test_Range),
Expand Down
2 changes: 1 addition & 1 deletion TestFoundation/TestNSData.swift
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@

class TestNSData: XCTestCase {

var allTests: [(String, () throws -> Void)] {
static var allTests: [(String, TestNSData -> () throws -> Void)] {
return [
("test_description", test_description),
("test_emptyDescription", test_emptyDescription),
Expand Down
2 changes: 1 addition & 1 deletion TestFoundation/TestNSDate.swift
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@

class TestNSDate : XCTestCase {

var allTests : [(String, () throws -> Void)] {
static var allTests: [(String, TestNSDate -> () throws -> Void)] {
return [
("test_BasicConstruction", test_BasicConstruction),
("test_InitTimeIntervalSince1970", test_InitTimeIntervalSince1970),
Expand Down
2 changes: 1 addition & 1 deletion TestFoundation/TestNSDictionary.swift
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ import SwiftXCTest

class TestNSDictionary : XCTestCase {

var allTests : [(String, () throws -> Void)] {
static var allTests: [(String, TestNSDictionary -> () throws -> Void)] {
return [
("test_BasicConstruction", test_BasicConstruction),
("test_ArrayConstruction", test_ArrayConstruction),
Expand Down
2 changes: 1 addition & 1 deletion TestFoundation/TestNSFileManager.swift
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@

class TestNSFileManger : XCTestCase {

var allTests : [(String, () throws -> Void)] {
static var allTests: [(String, TestNSFileManger -> () throws -> Void)] {
return [
("test_createDirectory", test_createDirectory ),
("test_createFile", test_createFile ),
Expand Down
2 changes: 1 addition & 1 deletion TestFoundation/TestNSGeometry.swift
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@

class TestNSGeometry : XCTestCase {

var allTests : [(String, () throws -> Void)] {
static var allTests: [(String, TestNSGeometry -> () throws -> Void)] {
return [
("test_CGFloat_BasicConstruction", test_CGFloat_BasicConstruction),
("test_CGFloat_Equality", test_CGFloat_Equality),
Expand Down
2 changes: 1 addition & 1 deletion TestFoundation/TestNSHTTPCookie.swift
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@

class TestNSHTTPCookie: XCTestCase {

var allTests : [(String, () throws -> Void)] {
static var allTests: [(String, TestNSHTTPCookie -> () throws -> Void)] {
return [
("test_BasicConstruction", test_BasicConstruction),
("test_RequestHeaderFields", test_RequestHeaderFields)
Expand Down
2 changes: 1 addition & 1 deletion TestFoundation/TestNSIndexPath.swift
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@

class TestNSIndexPath: XCTestCase {

var allTests: [(String, () throws -> Void)] {
static var allTests: [(String, TestNSIndexPath -> () throws -> Void)] {
return [
("test_BasicConstruction", test_BasicConstruction)
]
Expand Down
2 changes: 1 addition & 1 deletion TestFoundation/TestNSIndexSet.swift
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ import SwiftXCTest

class TestNSIndexSet : XCTestCase {

var allTests : [(String, () throws -> Void)] {
static var allTests: [(String, TestNSIndexSet -> () throws -> Void)] {
return [
("test_BasicConstruction", test_BasicConstruction),
("test_enumeration", test_enumeration),
Expand Down
8 changes: 4 additions & 4 deletions TestFoundation/TestNSJSONSerialization.swift
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ class TestNSJSONSerialization : XCTestCase {
NSUTF32LittleEndianStringEncoding, NSUTF32BigEndianStringEncoding
]

var allTests : [(String, () throws -> Void)] {
static var allTests: [(String, TestNSJSONSerialization -> () throws -> Void)] {
return JSONObjectWithDataTests
+ deserializationTests
+ isValidJSONObjectTests
Expand All @@ -36,7 +36,7 @@ class TestNSJSONSerialization : XCTestCase {
//MARK: - JSONObjectWithData
extension TestNSJSONSerialization {

var JSONObjectWithDataTests: [(String, () throws -> Void)] {
class var JSONObjectWithDataTests: [(String, TestNSJSONSerialization -> () throws -> Void)] {
return [
("test_JSONObjectWithData_emptyObject", test_JSONObjectWithData_emptyObject),
("test_JSONObjectWithData_encodingDetection", test_JSONObjectWithData_encodingDetection),
Expand Down Expand Up @@ -84,7 +84,7 @@ extension TestNSJSONSerialization {
//MARK: - JSONDeserialization
extension TestNSJSONSerialization {

var deserializationTests: [(String, () throws -> Void)] {
class var deserializationTests: [(String, TestNSJSONSerialization -> () throws -> Void)] {
return [
("test_deserialize_emptyObject", test_deserialize_emptyObject),
("test_deserialize_multiStringObject", test_deserialize_multiStringObject),
Expand Down Expand Up @@ -456,7 +456,7 @@ extension TestNSJSONSerialization {
// MARK: - isValidJSONObjectTests
extension TestNSJSONSerialization {

var isValidJSONObjectTests: [(String, () throws -> Void)] {
class var isValidJSONObjectTests: [(String, TestNSJSONSerialization -> () throws -> Void)] {
return [
("test_isValidJSONObjectTrue", test_isValidJSONObjectTrue),
("test_isValidJSONObjectFalse", test_isValidJSONObjectFalse),
Expand Down
2 changes: 1 addition & 1 deletion TestFoundation/TestNSKeyedArchiver.swift
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ public class UserClass : NSObject, NSSecureCoding {
}

class TestNSKeyedArchiver : XCTestCase {
var allTests : [(String, () throws -> Void)] {
static var allTests: [(String, TestNSKeyedArchiver -> () throws -> Void)] {
return [
("test_archive_array", test_archive_array),
("test_archive_charptr", test_archive_charptr),
Expand Down
2 changes: 1 addition & 1 deletion TestFoundation/TestNSKeyedUnarchiver.swift
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@


class TestNSKeyedUnarchiver : XCTestCase {
var allTests : [(String, () throws -> Void)] {
static var allTests: [(String, TestNSKeyedUnarchiver -> () throws -> Void)] {
return [
("test_unarchive_array", test_unarchive_array),
("test_unarchive_complex", test_unarchive_complex),
Expand Down
2 changes: 1 addition & 1 deletion TestFoundation/TestNSLocale.swift
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
#endif

class TestNSLocale : XCTestCase {
var allTests : [(String, () throws -> Void)] {
static var allTests: [(String, TestNSLocale -> () throws -> Void)] {
return [
("test_constants", test_constants),
]
Expand Down
2 changes: 1 addition & 1 deletion TestFoundation/TestNSNotificationCenter.swift
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@


class TestNSNotificationCenter : XCTestCase {
var allTests : [(String, () throws -> Void)] {
static var allTests: [(String, TestNSNotificationCenter -> () throws -> Void)] {
return [
("test_defaultCenter", test_defaultCenter),
("test_postNotification", test_postNotification),
Expand Down
2 changes: 1 addition & 1 deletion TestFoundation/TestNSNotificationQueue.swift
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@


class TestNSNotificationQueue : XCTestCase {
var allTests : [(String, () throws -> ())] {
static var allTests : [(String, TestNSNotificationQueue -> () throws -> Void)] {
return [
("test_defaultQueue", test_defaultQueue),
("test_postNowToDefaultQueueWithoutCoalescing", test_postNowToDefaultQueueWithoutCoalescing),
Expand Down
2 changes: 1 addition & 1 deletion TestFoundation/TestNSNull.swift
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@

class TestNSNull : XCTestCase {

var allTests: [(String, () throws -> Void)] {
static var allTests: [(String, TestNSNull -> () throws -> Void)] {
return [
("test_alwaysEqual", test_alwaysEqual)
]
Expand Down
2 changes: 1 addition & 1 deletion TestFoundation/TestNSNumber.swift
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ import SwiftXCTest


class TestNSNumber : XCTestCase {
var allTests : [(String, () throws -> Void)] {
static var allTests: [(String, TestNSNumber -> () throws -> Void)] {
return [
("test_NumberWithBool", test_NumberWithBool ),
("test_numberWithChar", test_numberWithChar ),
Expand Down
2 changes: 1 addition & 1 deletion TestFoundation/TestNSNumberFormatter.swift
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ import CoreFoundation

class TestNSNumberFormatter: XCTestCase {

var allTests : [(String, () throws -> Void)] {
static var allTests: [(String, TestNSNumberFormatter -> () throws -> Void)] {
return [
("test_currencyCode", test_currencyCode),
("test_decimalSeparator", test_decimalSeparator),
Expand Down
2 changes: 1 addition & 1 deletion TestFoundation/TestNSOrderedSet.swift
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@

class TestNSOrderedSet : XCTestCase {

var allTests : [(String, () throws -> Void)] {
static var allTests: [(String, TestNSOrderedSet -> () throws -> Void)] {
return [
("test_BasicConstruction", test_BasicConstruction),
("test_Enumeration", test_Enumeration),
Expand Down
2 changes: 1 addition & 1 deletion TestFoundation/TestNSPipe.swift
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ import SwiftXCTest

class TestNSPipe : XCTestCase {

var allTests: [(String, () throws -> Void)] {
static var allTests: [(String, TestNSPipe -> () throws -> Void)] {
return [
// Currently disabled until NSString implements dataUsingEncoding
// ("test_NSPipe", test_NSPipe)
Expand Down
2 changes: 1 addition & 1 deletion TestFoundation/TestNSProcessInfo.swift
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@

class TestNSProcessInfo : XCTestCase {

var allTests : [(String, () throws -> Void)] {
static var allTests: [(String, TestNSProcessInfo -> () throws -> Void)] {
return [
("test_operatingSystemVersion", test_operatingSystemVersion ),
("test_processName", test_processName ),
Expand Down
2 changes: 1 addition & 1 deletion TestFoundation/TestNSPropertyList.swift
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ import SwiftXCTest


class TestNSPropertyList : XCTestCase {
var allTests : [(String, () throws -> Void)] {
static var allTests: [(String, TestNSPropertyList -> () throws -> Void)] {
return [
("test_BasicConstruction", test_BasicConstruction ),
("test_decode", test_decode ),
Expand Down
2 changes: 1 addition & 1 deletion TestFoundation/TestNSRange.swift
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ import SwiftXCTest

class TestNSRange : XCTestCase {

var allTests : [(String, () throws -> Void)] {
static var allTests: [(String, TestNSRange -> () throws -> Void)] {
return [
// currently disabled due to pending requirements for NSString
// ("test_NSRangeFromString", test_NSRangeFromString ),
Expand Down
2 changes: 1 addition & 1 deletion TestFoundation/TestNSRegularExpression.swift
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ import SwiftXCTest

class TestNSRegularExpression : XCTestCase {

var allTests : [(String, () throws -> ())] {
static var allTests : [(String, TestNSRegularExpression -> () throws -> Void)] {
return [
("test_simpleRegularExpressions", test_simpleRegularExpressions),
("test_regularExpressionReplacement", test_regularExpressionReplacement)
Expand Down
2 changes: 1 addition & 1 deletion TestFoundation/TestNSRunLoop.swift
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@


class TestNSRunLoop : XCTestCase {
var allTests : [(String, () throws -> ())] {
static var allTests : [(String, TestNSRunLoop -> () throws -> Void)] {
return [
("test_constants", test_constants),
("test_runLoopInit", test_runLoopInit),
Expand Down
2 changes: 1 addition & 1 deletion TestFoundation/TestNSScanner.swift
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@

class TestNSScanner : XCTestCase {

var allTests : [(String, () throws -> Void)] {
static var allTests: [(String, TestNSScanner -> () throws -> Void)] {
return [
("test_scanInteger", test_scanInteger),
]
Expand Down
2 changes: 1 addition & 1 deletion TestFoundation/TestNSSet.swift
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ import SwiftXCTest

class TestNSSet : XCTestCase {

var allTests : [(String, () throws -> Void)] {
static var allTests: [(String, TestNSSet -> () throws -> Void)] {
return [
("test_BasicConstruction", test_BasicConstruction),
("testInitWithSet", testInitWithSet),
Expand Down
4 changes: 2 additions & 2 deletions TestFoundation/TestNSString.swift
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ internal let kCFStringEncodingUTF32LE = CFStringBuiltInEncodings.UTF32LE.rawVal

class TestNSString : XCTestCase {

var allTests : [(String, () throws -> Void)] {
static var allTests: [(String, TestNSString -> () throws -> Void)] {
return [
("test_boolValue", test_boolValue ),
("test_BridgeConstruction", test_BridgeConstruction ),
Expand Down Expand Up @@ -81,7 +81,7 @@ class TestNSString : XCTestCase {
("test_ExternalRepresentation", test_ExternalRepresentation),
("test_mutableStringConstructor", test_mutableStringConstructor),
("test_PrefixSuffix", test_PrefixSuffix),
("test_reflection", test_reflection),
("test_reflection", { _ in test_reflection }),
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

unrelated to this change but we should consider moving this into an actual test scope.

]
}

Expand Down
2 changes: 1 addition & 1 deletion TestFoundation/TestNSTask.swift
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
import CoreFoundation

class TestNSTask : XCTestCase {
var allTests: [(String, () throws -> Void)] {
static var allTests: [(String, TestNSTask -> () throws -> Void)] {
return [("test_exit0" , test_exit0),
("test_exit1" , test_exit1),
("test_exit100" , test_exit100),
Expand Down
2 changes: 1 addition & 1 deletion TestFoundation/TestNSThread.swift
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@


class TestNSThread : XCTestCase {
var allTests : [(String, () throws -> Void)] {
static var allTests: [(String, TestNSThread -> () throws -> Void)] {
return [
("test_currentThread", test_currentThread ),
("test_threadStart", test_threadStart),
Expand Down
2 changes: 1 addition & 1 deletion TestFoundation/TestNSTimeZone.swift
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@

class TestNSTimeZone: XCTestCase {

var allTests : [(String, () throws -> Void)] {
static var allTests: [(String, TestNSTimeZone -> () throws -> Void)] {
return [
// Disabled see https://bugs.swift.org/browse/SR-300
// ("test_abbreviation", test_abbreviation),
Expand Down
2 changes: 1 addition & 1 deletion TestFoundation/TestNSTimer.swift
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@


class TestNSTimer : XCTestCase {
var allTests : [(String, () throws -> ())] {
static var allTests : [(String, TestNSTimer -> () throws -> Void)] {
return [
("test_timerInit", test_timerInit),
("test_timerTickOnce", test_timerTickOnce),
Expand Down
4 changes: 2 additions & 2 deletions TestFoundation/TestNSURL.swift
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ private func getTestData() -> [Any]? {
}

class TestNSURL : XCTestCase {
var allTests : [(String, () throws -> Void)] {
static var allTests: [(String, TestNSURL -> () throws -> Void)] {
return [
("test_URLStrings", test_URLStrings),
("test_fileURLWithPath_relativeToURL", test_fileURLWithPath_relativeToURL ),
Expand Down Expand Up @@ -420,7 +420,7 @@ class TestNSURL : XCTestCase {
}

class TestNSURLComponents : XCTestCase {
var allTests : [(String, () throws -> Void)] {
static var allTests: [(String, TestNSURLComponents -> () throws -> Void)] {
return [
("test_string", test_string),
]
Expand Down
2 changes: 1 addition & 1 deletion TestFoundation/TestNSURLRequest.swift
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@

class TestNSURLRequest : XCTestCase {

var allTests : [(String, () throws -> Void)] {
static var allTests: [(String, TestNSURLRequest -> () throws -> Void)] {
return [
("test_construction", test_construction),
("test_mutableConstruction", test_mutableConstruction),
Expand Down
Loading