From 088cb1c416900a24ed66327ca6cf7763ff8d1f04 Mon Sep 17 00:00:00 2001 From: meatball <69751659+meatball133@users.noreply.github.com> Date: Thu, 22 Jun 2023 19:26:01 +0000 Subject: [PATCH 1/2] Fixed help functions --- changelog.md | 4 ++++ src/testrunner/Sources/TestRunner/main.swift | 1 + 2 files changed, 5 insertions(+) diff --git a/changelog.md b/changelog.md index 2879218..7b3860e 100644 --- a/changelog.md +++ b/changelog.md @@ -1,3 +1,7 @@ +# 1.1.1 + +- Fixed an issue causing help functions to be marked as test cases + # 1.1.0 - The test runner will run one test at a time, this is to be able to give a better error message when a test fails. diff --git a/src/testrunner/Sources/TestRunner/main.swift b/src/testrunner/Sources/TestRunner/main.swift index 7fe5514..ecc5b03 100644 --- a/src/testrunner/Sources/TestRunner/main.swift +++ b/src/testrunner/Sources/TestRunner/main.swift @@ -33,6 +33,7 @@ class TestRunner{ let bodyCheck = node.body if bodyCheck != nil{ let name: String = String(describing: node.identifier) + guard name.hasPrefix("test") else { return SyntaxVisitorContinueKind.visitChildren } var body: String = String(describing: bodyCheck!).trimmingCharacters(in: charactersToRemove) body = String(body[body.index(after: body.startIndex).. Date: Thu, 29 Jun 2023 08:50:40 +0000 Subject: [PATCH 2/2] Fixed an issue which caused too long messages --- changelog.md | 1 + src/testrunner/Sources/TestRunner/main.swift | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/changelog.md b/changelog.md index 7b3860e..5eaf22a 100644 --- a/changelog.md +++ b/changelog.md @@ -1,6 +1,7 @@ # 1.1.1 - Fixed an issue causing help functions to be marked as test cases +- Made the output when writting a compile error shorter # 1.1.0 diff --git a/src/testrunner/Sources/TestRunner/main.swift b/src/testrunner/Sources/TestRunner/main.swift index ecc5b03..413a3c6 100644 --- a/src/testrunner/Sources/TestRunner/main.swift +++ b/src/testrunner/Sources/TestRunner/main.swift @@ -248,7 +248,7 @@ class TestRunner{ let message = something.components(separatedBy: "\n")[1...] var start = 0 for (rowIdx, row) in message.enumerated(){ - if row.contains("CompileError.swift:") || row.contains("\(camelCase(slug: slug))Tests.swift:"){ + if row.contains("CompileError.swift:") || row.contains("\(camelCase(slug: slug))Tests.swift:") || row.contains("\(camelCase(slug: slug)).swift:") { start = rowIdx + 1 break }