From 1f9b420a6c045403174e9caa4ac4c47abd6c5c62 Mon Sep 17 00:00:00 2001 From: Franklin Schrans Date: Tue, 24 Apr 2018 17:16:55 +0100 Subject: [PATCH] Include success messages when tests pass --- Package.resolved | 4 ++-- Sources/lite/main.swift | 15 +++++++++++---- 2 files changed, 13 insertions(+), 6 deletions(-) diff --git a/Package.resolved b/Package.resolved index 81690608..94b2ab77 100644 --- a/Package.resolved +++ b/Package.resolved @@ -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" } }, { diff --git a/Sources/lite/main.swift b/Sources/lite/main.swift index a876f900..37f17812 100644 --- a/Sources/lite/main.swift +++ b/Sources/lite/main.swift @@ -38,7 +38,8 @@ func runParserTests() -> Bool { pathExtensions: ["flint"], testDirPath: "Tests/ParserTests", testLinePrefix: "//", - parallelismLevel: .automatic) + parallelismLevel: .automatic, + successMessage: "Parser tests passed.") return allPassed } @@ -47,7 +48,8 @@ func runSemanticTests() -> Bool { pathExtensions: ["flint"], testDirPath: "Tests/SemanticTests", testLinePrefix: "//", - parallelismLevel: .automatic) + parallelismLevel: .automatic, + successMessage: "Semantic tests passed.") return allPassed } @@ -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())