Skip to content

Commit

Permalink
Include success messages when tests pass
Browse files Browse the repository at this point in the history
  • Loading branch information
franklinsch committed Apr 24, 2018
1 parent 4561e09 commit 1f9b420
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 6 deletions.
4 changes: 2 additions & 2 deletions Package.resolved
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,8 @@
"repositoryURL": "https://github.com/llvm-swift/Lite.git",
"state": {
"branch": null,
"revision": "8516d762b1483a6c6c506482567df5dbb79cb293",
"version": "0.0.9"
"revision": "47808d5502b7328c9e91f2800f94f885357b9ffc",
"version": "0.0.11"
}
},
{
Expand Down
15 changes: 11 additions & 4 deletions Sources/lite/main.swift
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,8 @@ func runParserTests() -> Bool {
pathExtensions: ["flint"],
testDirPath: "Tests/ParserTests",
testLinePrefix: "//",
parallelismLevel: .automatic)
parallelismLevel: .automatic,
successMessage: "Parser tests passed.")
return allPassed
}

Expand All @@ -47,7 +48,8 @@ func runSemanticTests() -> Bool {
pathExtensions: ["flint"],
testDirPath: "Tests/SemanticTests",
testLinePrefix: "//",
parallelismLevel: .automatic)
parallelismLevel: .automatic,
successMessage: "Semantic tests passed.")
return allPassed
}

Expand All @@ -56,12 +58,17 @@ func runBehaviorTests() -> Bool {
pathExtensions: ["js"],
testDirPath: "Tests/BehaviorTests",
testLinePrefix: "//",
parallelismLevel: .none)
parallelismLevel: .none,
successMessage: "Behavior tests passed.")
return allPassed
}

func run() -> Int32 {
return runParserTests() && runSemanticTests() && runBehaviorTests() ? EXIT_SUCCESS : EXIT_FAILURE
let allPassed = runParserTests() && runSemanticTests() && runBehaviorTests()
if allPassed {
print("All tests passed! 🎉".green.bold)
}
return allPassed ? EXIT_SUCCESS : EXIT_FAILURE
}

exit(run())

0 comments on commit 1f9b420

Please sign in to comment.