Skip to content

Commit

Permalink
Clean up.
Browse files Browse the repository at this point in the history
  • Loading branch information
Jasper Blues committed Dec 24, 2014
1 parent af85fc0 commit cd474b9
Show file tree
Hide file tree
Showing 72 changed files with 704 additions and 1,000 deletions.
6 changes: 4 additions & 2 deletions .idea/XcodeEditor.iml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

27 changes: 25 additions & 2 deletions .idea/codeStyleSettings.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 9 additions & 0 deletions .idea/runConfigurations/Pods.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

38 changes: 0 additions & 38 deletions Source/Main/XcodeSourceFileType.h

This file was deleted.

File renamed without changes.
File renamed without changes.
File renamed without changes.
31 changes: 0 additions & 31 deletions Source/Tests/CoverageFixer.m

This file was deleted.

41 changes: 0 additions & 41 deletions Source/Tests/XcodeFileReferenceTypeTests.m

This file was deleted.

File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
39 changes: 39 additions & 0 deletions Source/XcodeSourceFileType.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
////////////////////////////////////////////////////////////////////////////////
//
// JASPER BLUES
// Copyright 2012 Jasper Blues
// All Rights Reserved.
//
// NOTICE: Jasper Blues permits you to use, modify, and distribute this file
// in accordance with the terms of the license agreement accompanying it.
//
////////////////////////////////////////////////////////////////////////////////

#import <Foundation/Foundation.h>

typedef NS_OPTIONS(NSUInteger, XcodeSourceFileType)
{
FileTypeNil = 0, // Unknown filetype
Framework = 1, // .framework
PropertyList = 2, // .plist
SourceCodeHeader = 3, // .h
SourceCodeObjC = 4, // .m
SourceCodeObjCPlusPlus = 5, // .mm
SourceCodeCPlusPlus = 6, // .cpp
XibFile = 7, // .xib
ImageResourcePNG = 8, // .png
Bundle = 9, // .bundle .octet
Archive = 10, // .a files
HTML = 11, // HTML file
TEXT = 12, // Some text file
XcodeProject = 13, // .xcodeproj
Folder = 14 // a Folder reference
};


NSString* NSStringFromXCSourceFileType(XcodeSourceFileType type);

XcodeSourceFileType XCSourceFileTypeFromStringRepresentation(NSString* string);

XcodeSourceFileType XCSourceFileTypeFromFileName(NSString* fileName);

Original file line number Diff line number Diff line change
Expand Up @@ -49,9 +49,9 @@ XcodeSourceFileType XCSourceFileTypeFromStringRepresentation(NSString* string)
{
NSDictionary* typeStrings = NSDictionaryWithXCFileReferenceTypes();

if ([typeStrings objectForKey:string])
if (typeStrings[string])
{
return (XcodeSourceFileType) [[typeStrings objectForKey:string] intValue];
return (XcodeSourceFileType) [typeStrings[string] intValue];
}
else
{
Expand Down
24 changes: 24 additions & 0 deletions XcodeEditorTests/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>codemonastery.com.$(PRODUCT_NAME:rfc1034identifier)</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>
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
//
////////////////////////////////////////////////////////////////////////////////


#import "NSString+TestResource.h"

@implementation NSString (TestResource)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,10 @@
//
////////////////////////////////////////////////////////////////////////////////

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

@interface XCClassDefinitionTests : SenTestCase
@interface XCClassDefinitionTests : XCTestCase
@end

@implementation XCClassDefinitionTests
Expand All @@ -29,15 +29,15 @@ - (void)test_allows_initialization_with_a_fileName_attribute
{
classDefinition = [[XCClassDefinition alloc] initWithName:@"ESA_Sales_Browse_ViewController"];

assertThat(classDefinition.className, notNilValue());
assertThat(classDefinition.className, equalTo(@"ESA_Sales_Browse_ViewController"));
assertThatBool([classDefinition isObjectiveC], equalToBool(YES));
XCTAssertNotNil(classDefinition.className);
XCTAssertEqualObjects(classDefinition.className, @"ESA_Sales_Browse_ViewController");
XCTAssertTrue([classDefinition isObjectiveC]);
}

- (void)test_allow_initialization_with_a_filename_and_language_attribute
{
classDefinition = [[XCClassDefinition alloc] initWithName:@"ESA_Sales_Browse_ViewController" language:ObjectiveCPlusPlus];
assertThatBool([classDefinition isObjectiveCPlusPlus], equalToBool(YES));
XCTAssertTrue([classDefinition isObjectiveCPlusPlus]);
}

- (void)test_it_throws_an_exception_if_one_of_the_above_languages_is_not_specified
Expand All @@ -49,7 +49,7 @@ - (void)test_it_throws_an_exception_if_one_of_the_above_languages_is_not_specifi
}
@catch (NSException* e)
{
assertThat([e reason], equalTo(@"Language must be one of ObjectiveC, ObjectiveCPlusPlus"));
XCTAssertEqualObjects([e reason], @"Language must be one of ObjectiveC, ObjectiveCPlusPlus");
}
}

Expand All @@ -61,15 +61,15 @@ - (void)test_it_throws_an_exception_if_one_of_the_above_languages_is_not_specifi
- (void)test_it_returns_the_conventional_file_names_for_objective_c_classes
{
classDefinition = [[XCClassDefinition alloc] initWithName:@"MyClass" language:ObjectiveC];
assertThat([classDefinition headerFileName], equalTo(@"MyClass.h"));
assertThat([classDefinition sourceFileName], equalTo(@"MyClass.m"));
XCTAssertEqualObjects([classDefinition headerFileName], @"MyClass.h");
XCTAssertEqualObjects([classDefinition sourceFileName], @"MyClass.m");
}

- (void)test_it_returns_the_conventional_file_names_for_objective_cPlusPlus_classes
{
classDefinition = [[XCClassDefinition alloc] initWithName:@"MyClass" language:ObjectiveCPlusPlus];
assertThat([classDefinition headerFileName], equalTo(@"MyClass.h"));
assertThat([classDefinition sourceFileName], equalTo(@"MyClass.mm"));
XCTAssertEqualObjects([classDefinition headerFileName], @"MyClass.h");
XCTAssertEqualObjects([classDefinition sourceFileName], @"MyClass.mm");
}


Expand Down
Loading

0 comments on commit cd474b9

Please sign in to comment.