Skip to content
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

Convert Tests into XCTest, Support for generic types #14

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
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
183 changes: 100 additions & 83 deletions LinqToObjectiveCTest/LinqToObjectiveCTest.xcodeproj/project.pbxproj

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -0,0 +1,101 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "0710"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
buildImplicitDependencies = "YES">
<BuildActionEntries>
<BuildActionEntry
buildForTesting = "YES"
buildForRunning = "YES"
buildForProfiling = "YES"
buildForArchiving = "YES"
buildForAnalyzing = "YES">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "72EC7E0817DC4DA0009AA360"
BuildableName = "LinqToObjectiveCTest.app"
BlueprintName = "LinqToObjectiveCTest"
ReferencedContainer = "container:LinqToObjectiveCTest.xcodeproj">
</BuildableReference>
</BuildActionEntry>
</BuildActionEntries>
</BuildAction>
<TestAction
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
shouldUseLaunchSchemeArgsEnv = "YES">
<Testables>
<TestableReference
skipped = "NO">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "B6A146871C05B06200EB6770"
BuildableName = "LinqToObjectiveCTestTests.xctest"
BlueprintName = "LinqToObjectiveCTestTests"
ReferencedContainer = "container:LinqToObjectiveCTest.xcodeproj">
</BuildableReference>
</TestableReference>
</Testables>
<MacroExpansion>
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "72EC7E0817DC4DA0009AA360"
BuildableName = "LinqToObjectiveCTest.app"
BlueprintName = "LinqToObjectiveCTest"
ReferencedContainer = "container:LinqToObjectiveCTest.xcodeproj">
</BuildableReference>
</MacroExpansion>
<AdditionalOptions>
</AdditionalOptions>
</TestAction>
<LaunchAction
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
launchStyle = "0"
useCustomWorkingDirectory = "NO"
ignoresPersistentStateOnLaunch = "NO"
debugDocumentVersioning = "YES"
debugServiceExtension = "internal"
allowLocationSimulation = "YES">
<BuildableProductRunnable
runnableDebuggingMode = "0">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "72EC7E0817DC4DA0009AA360"
BuildableName = "LinqToObjectiveCTest.app"
BlueprintName = "LinqToObjectiveCTest"
ReferencedContainer = "container:LinqToObjectiveCTest.xcodeproj">
</BuildableReference>
</BuildableProductRunnable>
<AdditionalOptions>
</AdditionalOptions>
</LaunchAction>
<ProfileAction
buildConfiguration = "Release"
shouldUseLaunchSchemeArgsEnv = "YES"
savedToolIdentifier = ""
useCustomWorkingDirectory = "NO"
debugDocumentVersioning = "YES">
<BuildableProductRunnable
runnableDebuggingMode = "0">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "72EC7E0817DC4DA0009AA360"
BuildableName = "LinqToObjectiveCTest.app"
BlueprintName = "LinqToObjectiveCTest"
ReferencedContainer = "container:LinqToObjectiveCTest.xcodeproj">
</BuildableReference>
</BuildableProductRunnable>
</ProfileAction>
<AnalyzeAction
buildConfiguration = "Debug">
</AnalyzeAction>
<ArchiveAction
buildConfiguration = "Release"
revealArchiveInOrganizer = "YES">
</ArchiveAction>
</Scheme>
1 change: 1 addition & 0 deletions LinqToObjectiveCTest/LinqToObjectiveCTest/AppDelegate.m
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(
self.window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]];
// Override point for customization after application launch.
self.window.backgroundColor = [UIColor whiteColor];
self.window.rootViewController = [UIViewController new];
[self.window makeKeyAndVisible];
return YES;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
<key>CFBundleExecutable</key>
<string>${EXECUTABLE_NAME}</string>
<key>CFBundleIdentifier</key>
<string>Eu.$(PRODUCT_NAME:rfc1034identifier)</string>
<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleName</key>
Expand Down
24 changes: 24 additions & 0 deletions LinqToObjectiveCTest/LinqToObjectiveCTestTests/Info.plist
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>CFBundleDevelopmentRegion</key>
<string>en</string>
<key>CFBundleExecutable</key>
<string>$(EXECUTABLE_NAME)</string>
<key>CFBundleIdentifier</key>
<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleName</key>
<string>$(PRODUCT_NAME)</string>
<key>CFBundlePackageType</key>
<string>BNDL</string>
<key>CFBundleShortVersionString</key>
<string>1.0</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
<string>1</string>
</dict>
</plist>
4 changes: 2 additions & 2 deletions LinqToObjectiveCTest/LinqToObjectiveCTestTests/MacroTest.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
// Copyright (c) 2013 Colin Eberhardt. All rights reserved.
//

#import <SenTestingKit/SenTestingKit.h>
#import <XCTest/XCTest.h>

@interface MacroTest : SenTestCase
@interface MacroTest : XCTestCase

@end
24 changes: 12 additions & 12 deletions LinqToObjectiveCTest/LinqToObjectiveCTestTests/MacroTest.m
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,10 @@ - (void)testSelect

NSArray* names = [input linq_select:LINQSel(name)];

STAssertEquals(names.count, (NSUInteger)5, nil);
XCTAssertEqual(names.count, (NSUInteger)5);
// 'spot' check a few values
STAssertEquals(names[0], @"bob", nil);
STAssertEquals(names[4], @"joe", nil);
XCTAssertEqual(names[0], @"bob");
XCTAssertEqual(names[4], @"joe");
}

- (void)testSelectCast
Expand All @@ -39,10 +39,10 @@ - (void)testSelectCast

NSArray* ages = [input linq_select:LINQSelUInt(intAge)];

STAssertEquals(ages.count, (NSUInteger)5, nil);
XCTAssertEqual(ages.count, (NSUInteger)5);
// 'spot' check a few values
STAssertEqualObjects(ages[0], @25, nil);
STAssertEqualObjects(ages[4], @55, nil);
XCTAssertEqualObjects(ages[0], @25);
XCTAssertEqualObjects(ages[4], @55);
}

- (void)testSelectViaKey
Expand All @@ -51,10 +51,10 @@ - (void)testSelectViaKey

NSArray* names = [input linq_select:LINQKey(name)];

STAssertEquals(names.count, (NSUInteger)5, nil);
XCTAssertEqual(names.count, (NSUInteger)5);
// 'spot' check a few values
STAssertEquals(names[0], @"bob", nil);
STAssertEquals(names[4], @"joe", nil);
XCTAssertEqual(names[0], @"bob");
XCTAssertEqual(names[4], @"joe");
}

- (void)testSelectViaKeyPath
Expand All @@ -63,10 +63,10 @@ - (void)testSelectViaKeyPath

NSArray* names = [input linq_select:LINQKeyPath(name)];

STAssertEquals(names.count, (NSUInteger)5, nil);
XCTAssertEqual(names.count, (NSUInteger)5);
// 'spot' check a few values
STAssertEquals(names[0], @"bob", nil);
STAssertEquals(names[4], @"joe", nil);
XCTAssertEqual(names[0], @"bob");
XCTAssertEqual(names[4], @"joe");
}

@end
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
// Copyright (c) 2013 Colin Eberhardt. All rights reserved.
//

#import <SenTestingKit/SenTestingKit.h>
#import <XCTest/XCTest.h>

@interface NSArrayLinqExtensionsTest : SenTestCase
@interface NSArrayLinqExtensionsTest : XCTestCase

@end
Loading