Skip to content

Commit

Permalink
Fix test failure on Swift 4 snapshot
Browse files Browse the repository at this point in the history
  • Loading branch information
youming-lin committed Aug 28, 2017
1 parent 25f5c63 commit 6e223a7
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion Sources/ConfigurationTestExecutable/main.swift
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,12 @@ testsExecuted += 1
#endif

// test load file relative from executable
manager = ConfigurationManager().load(file: "../../Tests/ConfigurationTests/test.json", relativeFrom: .executable)
#if swift(>=3.2)
// executable location is different on Swift 4 tools
manager = ConfigurationManager().load(file: "../../../Tests/ConfigurationTests/test.json", relativeFrom: .executable)
#else
manager = ConfigurationManager().load(file: "../../Tests/ConfigurationTests/test.json", relativeFrom: .executable)
#endif

if manager["OAuth:configuration:state"] as? Bool == true {
print("Test Case '-[.executable]': PASS")
Expand Down

0 comments on commit 6e223a7

Please sign in to comment.