navdata test (requires manual download of data"
This commit is contained in:
parent
7320e8db77
commit
fff1088e78
@ -2,4 +2,70 @@
|
||||
<Bucket
|
||||
type = "0"
|
||||
version = "2.0">
|
||||
<Breakpoints>
|
||||
<BreakpointProxy
|
||||
BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
|
||||
<BreakpointContent
|
||||
shouldBeEnabled = "Yes"
|
||||
ignoreCount = "0"
|
||||
continueAfterRunningActions = "No"
|
||||
filePath = "FMC Planner 2/DropboxV2ObjC.m"
|
||||
timestampString = "482590544.98844"
|
||||
startingColumnNumber = "9223372036854775807"
|
||||
endingColumnNumber = "9223372036854775807"
|
||||
startingLineNumber = "28"
|
||||
endingLineNumber = "28"
|
||||
landmarkName = "-authorizeUserWithToke:completion:presenter:"
|
||||
landmarkType = "5">
|
||||
</BreakpointContent>
|
||||
</BreakpointProxy>
|
||||
<BreakpointProxy
|
||||
BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
|
||||
<BreakpointContent
|
||||
shouldBeEnabled = "No"
|
||||
ignoreCount = "0"
|
||||
continueAfterRunningActions = "No"
|
||||
filePath = "FMC Planner 2/AppDelegate.m"
|
||||
timestampString = "482590551.37978"
|
||||
startingColumnNumber = "9223372036854775807"
|
||||
endingColumnNumber = "9223372036854775807"
|
||||
startingLineNumber = "83"
|
||||
endingLineNumber = "83"
|
||||
landmarkName = "-setup"
|
||||
landmarkType = "5">
|
||||
</BreakpointContent>
|
||||
</BreakpointProxy>
|
||||
<BreakpointProxy
|
||||
BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
|
||||
<BreakpointContent
|
||||
shouldBeEnabled = "Yes"
|
||||
ignoreCount = "0"
|
||||
continueAfterRunningActions = "No"
|
||||
filePath = "FMC Planner 2/AppDelegate.m"
|
||||
timestampString = "482590556.394688"
|
||||
startingColumnNumber = "9223372036854775807"
|
||||
endingColumnNumber = "9223372036854775807"
|
||||
startingLineNumber = "64"
|
||||
endingLineNumber = "64"
|
||||
landmarkName = "-application:handleOpenURL:"
|
||||
landmarkType = "5">
|
||||
</BreakpointContent>
|
||||
</BreakpointProxy>
|
||||
<BreakpointProxy
|
||||
BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
|
||||
<BreakpointContent
|
||||
shouldBeEnabled = "No"
|
||||
ignoreCount = "0"
|
||||
continueAfterRunningActions = "No"
|
||||
filePath = "FMC Planner 2Tests/FMC_Planner_2Tests.m"
|
||||
timestampString = "482591208.671376"
|
||||
startingColumnNumber = "9223372036854775807"
|
||||
endingColumnNumber = "9223372036854775807"
|
||||
startingLineNumber = "26"
|
||||
endingLineNumber = "26"
|
||||
landmarkName = "-setUp"
|
||||
landmarkType = "5">
|
||||
</BreakpointContent>
|
||||
</BreakpointProxy>
|
||||
</Breakpoints>
|
||||
</Bucket>
|
||||
|
||||
@ -28,6 +28,7 @@
|
||||
|
||||
// Override point for customization after application launch.
|
||||
_dbClient = [[DropboxV2ObjC alloc] init];
|
||||
((AppDelegate *)[UIApplication sharedApplication].delegate).main = self;
|
||||
NSDictionary *credentials =
|
||||
[[NSURLCredentialStorage sharedCredentialStorage]
|
||||
credentialsForProtectionSpace:_dbClient.kDropboxProtectionSpace];
|
||||
|
||||
@ -264,7 +264,9 @@ NavDataParser *parser = nil;
|
||||
}
|
||||
else {
|
||||
// Right hand LSKs, aka waypoint entry
|
||||
if ([precedingWaypoint.text isEqualToString:@""]) {
|
||||
if ([precedingWaypoint.text isEqualToString:@""] &&
|
||||
![[_Header.text substringToIndex:7]
|
||||
isEqualToString:@"ROUTE 1"]) {
|
||||
// Not allowed
|
||||
NSLog(@"NOT ALLOWED 3");
|
||||
}
|
||||
|
||||
@ -6,9 +6,12 @@
|
||||
// Copyright © 2016 Kilian Hofmann. All rights reserved.
|
||||
//
|
||||
|
||||
#import "NavDataParser.h"
|
||||
#import <XCTest/XCTest.h>
|
||||
|
||||
@interface FMC_Planner_2Tests : XCTestCase
|
||||
@interface FMC_Planner_2Tests : XCTestCase {
|
||||
NavDataParser *parser;
|
||||
}
|
||||
|
||||
@end
|
||||
|
||||
@ -19,6 +22,9 @@
|
||||
[super setUp];
|
||||
// Put setup code here. This method is called before the invocation of each
|
||||
// test method in the class.
|
||||
if (parser == nil) {
|
||||
parser = [[NavDataParser alloc] init];
|
||||
}
|
||||
}
|
||||
|
||||
- (void)tearDown
|
||||
@ -28,4 +34,28 @@
|
||||
[super tearDown];
|
||||
}
|
||||
|
||||
#pragma mark - NavData
|
||||
|
||||
- (void)testWaypoint
|
||||
{
|
||||
XCTAssertTrue([parser findWaypoint:@"DKB"].count > 0);
|
||||
}
|
||||
|
||||
- (void)testAirway
|
||||
{
|
||||
XCTAssertTrue([parser findAirway:@"T104"].count > 0);
|
||||
}
|
||||
|
||||
- (void)testWaypointOnAirway
|
||||
{
|
||||
XCTAssertTrue([parser findWaypoint:@"DKB" onAirway:@"T702"].count == 0);
|
||||
}
|
||||
|
||||
- (void)testCrosspoint
|
||||
{
|
||||
XCTAssertTrue(
|
||||
[[parser findCrosspointBetween:@"T104" and:@"T702" withStart:@"DKB"]
|
||||
.firstObject isEqualToString:@"WLD"]);
|
||||
}
|
||||
|
||||
@end
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user