From d466f8e5df92fb00a6d764a9d00b17040738cf75 Mon Sep 17 00:00:00 2001 From: Max Leske Date: Tue, 30 Apr 2024 06:53:59 +0200 Subject: [PATCH] fix: remove stdout reporter test This test used fixtures that differed dramatically from the expected result. Fixing it would require properly templating the fixtures and writing somewhat complex matching logic. IMO it makes more sense to simply remove the test case entirely. --- .../SCITestReporterStdoutTest.class/README.md | 0 .../class/failureFixture.st | 5 --- .../class/failureFixtureNonTravis.st | 43 ------------------- .../class/failureFixtureTravis.st | 31 ------------- .../class/successFixture.st | 21 --------- .../instance/assert.matches..st | 9 ---- .../instance/testReportFailure.st | 14 ------ .../instance/testReportSuccess.st | 11 ----- .../methodProperties.json | 10 ----- .../properties.json | 14 ------ 10 files changed, 158 deletions(-) delete mode 100644 repository/SmalltalkCI-Tests.package/SCITestReporterStdoutTest.class/README.md delete mode 100644 repository/SmalltalkCI-Tests.package/SCITestReporterStdoutTest.class/class/failureFixture.st delete mode 100644 repository/SmalltalkCI-Tests.package/SCITestReporterStdoutTest.class/class/failureFixtureNonTravis.st delete mode 100644 repository/SmalltalkCI-Tests.package/SCITestReporterStdoutTest.class/class/failureFixtureTravis.st delete mode 100644 repository/SmalltalkCI-Tests.package/SCITestReporterStdoutTest.class/class/successFixture.st delete mode 100644 repository/SmalltalkCI-Tests.package/SCITestReporterStdoutTest.class/instance/assert.matches..st delete mode 100644 repository/SmalltalkCI-Tests.package/SCITestReporterStdoutTest.class/instance/testReportFailure.st delete mode 100644 repository/SmalltalkCI-Tests.package/SCITestReporterStdoutTest.class/instance/testReportSuccess.st delete mode 100644 repository/SmalltalkCI-Tests.package/SCITestReporterStdoutTest.class/methodProperties.json delete mode 100644 repository/SmalltalkCI-Tests.package/SCITestReporterStdoutTest.class/properties.json diff --git a/repository/SmalltalkCI-Tests.package/SCITestReporterStdoutTest.class/README.md b/repository/SmalltalkCI-Tests.package/SCITestReporterStdoutTest.class/README.md deleted file mode 100644 index e69de29b..00000000 diff --git a/repository/SmalltalkCI-Tests.package/SCITestReporterStdoutTest.class/class/failureFixture.st b/repository/SmalltalkCI-Tests.package/SCITestReporterStdoutTest.class/class/failureFixture.st deleted file mode 100644 index a345f48f..00000000 --- a/repository/SmalltalkCI-Tests.package/SCITestReporterStdoutTest.class/class/failureFixture.st +++ /dev/null @@ -1,5 +0,0 @@ -fixtures -failureFixture - ^ SmalltalkCI isTravisBuild - ifTrue: [ self failureFixtureTravis ] - ifFalse: [ self failureFixtureNonTravis ] \ No newline at end of file diff --git a/repository/SmalltalkCI-Tests.package/SCITestReporterStdoutTest.class/class/failureFixtureNonTravis.st b/repository/SmalltalkCI-Tests.package/SCITestReporterStdoutTest.class/class/failureFixtureNonTravis.st deleted file mode 100644 index 289db81e..00000000 --- a/repository/SmalltalkCI-Tests.package/SCITestReporterStdoutTest.class/class/failureFixtureNonTravis.st +++ /dev/null @@ -1,43 +0,0 @@ -fixtures -failureFixtureNonTravis - ^ ' -############### -# Stdout-testReportFailure# -# 8 Tests with 4 Failures and 1 Errors in s # -############### - -(3 tests passed) - -SCIExcludedTests - ✓ #testDeprecation (ms) - ✓ #testShouldFail (ms) - ✓ #testShouldPass (ms) - -######################### -# 5 tests did not pass: # -######################### - -SCIExcludedTests - ✗ #testAssertError (ms) - ✗ #testError (ms) - ✗ #testFailure (ms) - ✗ #testShouldPassUnexpectedly (ms) - ✗ #testThisIsAVeryLongMethodNameThat...playedCorrectlyInATravisLog (ms) - -########### -# Summary # -########### - -SCIExcludedTests - ✗ #testAssertError (ms) - ✗ #testError (ms) - ✗ #testFailure (ms) - ✗ #testShouldPassUnexpectedly (ms) - ✗ #testThisIsAVeryLongMethodNameThatProbablyNeedsToBeContractedInOrderToBeDisplayedCorrectlyInATravisLog (ms) -smalltalkCI Deprecation Warnings - - SCIExcludedTests>>testDeprecation (This is just a test) - - - Executed 8 Tests with 4 Failures and 1 Errors in s. - -' \ No newline at end of file diff --git a/repository/SmalltalkCI-Tests.package/SCITestReporterStdoutTest.class/class/failureFixtureTravis.st b/repository/SmalltalkCI-Tests.package/SCITestReporterStdoutTest.class/class/failureFixtureTravis.st deleted file mode 100644 index 62d0c849..00000000 --- a/repository/SmalltalkCI-Tests.package/SCITestReporterStdoutTest.class/class/failureFixtureTravis.st +++ /dev/null @@ -1,31 +0,0 @@ -fixtures -failureFixtureTravis - ^ ' -############### -# Stdout-testReportFailure# -# 8 Tests with 4 Failures and 1 Errors in s # -############### - -(3 tests passed) - -SCIExcludedTests - ✓ #testDeprecation (ms) - ✓ #testShouldFail (ms) - ✓ #testShouldPass (ms) - -######################### -# 5 tests did not pass: # -######################### - -SCIExcludedTests - ✗ #testAssertError (ms) - ✗ #testError (ms) - ✗ #testFailure (ms) - ✗ #testShouldPassUnexpectedly (ms) - ✗ #testThisIsAVeryLongMethodNameThat...playedCorrectlyInATravisLog (ms) -smalltalkCI Deprecation Warnings - - SCIExcludedTests>>testDeprecation (This is just a test) - - Executed 8 Tests with 4 Failures and 1 Errors in s. - -' \ No newline at end of file diff --git a/repository/SmalltalkCI-Tests.package/SCITestReporterStdoutTest.class/class/successFixture.st b/repository/SmalltalkCI-Tests.package/SCITestReporterStdoutTest.class/class/successFixture.st deleted file mode 100644 index 7d4c6dcf..00000000 --- a/repository/SmalltalkCI-Tests.package/SCITestReporterStdoutTest.class/class/successFixture.st +++ /dev/null @@ -1,21 +0,0 @@ -fixtures -successFixture - ^ ' -############# -# Stdout-testReportSuccess# -# 5 Tests with 0 Failures and 0 Errors in s # -############# - -(5 tests passed) - -SCIPassingTests - ✓ #testAssert (ms) - ✓ #testAssertEquals (ms) - ✓ #testDeny (ms) - ✓ #testEmpty (ms) - ✓ #testRaise (ms) - - - Executed 5 Tests with 0 Failures and 0 Errors in s. - -' \ No newline at end of file diff --git a/repository/SmalltalkCI-Tests.package/SCITestReporterStdoutTest.class/instance/assert.matches..st b/repository/SmalltalkCI-Tests.package/SCITestReporterStdoutTest.class/instance/assert.matches..st deleted file mode 100644 index 2ab27ae6..00000000 --- a/repository/SmalltalkCI-Tests.package/SCITestReporterStdoutTest.class/instance/assert.matches..st +++ /dev/null @@ -1,9 +0,0 @@ -helpers -assert: aFixture matches: aString - "Assert that all characters of aFixture are also in aString (also respect the order)." - | index | - index := 1. - aFixture do: [ :char | - index := aString indexOf: char startingAt: index. - index = 0 ifTrue: [ - TestResult failure signal: 'Cannot match: "', aFixture, '" to: "', aString , '"' ] ] \ No newline at end of file diff --git a/repository/SmalltalkCI-Tests.package/SCITestReporterStdoutTest.class/instance/testReportFailure.st b/repository/SmalltalkCI-Tests.package/SCITestReporterStdoutTest.class/instance/testReportFailure.st deleted file mode 100644 index 1cd15387..00000000 --- a/repository/SmalltalkCI-Tests.package/SCITestReporterStdoutTest.class/instance/testReportFailure.st +++ /dev/null @@ -1,14 +0,0 @@ -testing -testReportFailure - | warnings runner reporter stream result | - warnings := SmalltalkCI deprecationWarnings. - [ SmalltalkCI deprecatedReset. - runner := SmalltalkCI testRunnerClass runSpec: ( - SCIDummySpec - named: 'Stdout-testReportFailure' - forClass: SCIExcludedTests). - stream := WriteStream on: (String new: 1000). - reporter := SCITestReporterStdout report: runner on: stream. - result := stream contents. - self assert: self class failureFixture matches: result ] - ensure: [ SmalltalkCI deprecationWarnings: warnings ] diff --git a/repository/SmalltalkCI-Tests.package/SCITestReporterStdoutTest.class/instance/testReportSuccess.st b/repository/SmalltalkCI-Tests.package/SCITestReporterStdoutTest.class/instance/testReportSuccess.st deleted file mode 100644 index e5515fe2..00000000 --- a/repository/SmalltalkCI-Tests.package/SCITestReporterStdoutTest.class/instance/testReportSuccess.st +++ /dev/null @@ -1,11 +0,0 @@ -testing -testReportSuccess - | runner reporter stream result | - runner := SmalltalkCI testRunnerClass runSpec: ( - SCIDummySpec - named: 'Stdout-testReportSuccess' - forClass: SCIPassingTests). - stream := WriteStream on: (String new: 1000). - reporter := SCITestReporterStdout report: runner on: stream. - result := stream contents. - self assert: self class successFixture matches: result \ No newline at end of file diff --git a/repository/SmalltalkCI-Tests.package/SCITestReporterStdoutTest.class/methodProperties.json b/repository/SmalltalkCI-Tests.package/SCITestReporterStdoutTest.class/methodProperties.json deleted file mode 100644 index 0ed62962..00000000 --- a/repository/SmalltalkCI-Tests.package/SCITestReporterStdoutTest.class/methodProperties.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "class" : { - "failureFixture" : "fn 12/9/2016 17:55", - "failureFixtureNonTravis" : "fn 11/11/2017 15:10", - "failureFixtureTravis" : "fn 11/11/2017 15:10", - "successFixture" : "fn 11/10/2017 14:38" }, - "instance" : { - "assert:matches:" : "fn 12/9/2016 18:03", - "testReportFailure" : "fn 11/12/2017 23:36", - "testReportSuccess" : "fn 11/12/2017 23:36" } } diff --git a/repository/SmalltalkCI-Tests.package/SCITestReporterStdoutTest.class/properties.json b/repository/SmalltalkCI-Tests.package/SCITestReporterStdoutTest.class/properties.json deleted file mode 100644 index 07313332..00000000 --- a/repository/SmalltalkCI-Tests.package/SCITestReporterStdoutTest.class/properties.json +++ /dev/null @@ -1,14 +0,0 @@ -{ - "category" : "SmalltalkCI-Tests", - "classinstvars" : [ - ], - "classvars" : [ - ], - "commentStamp" : "", - "instvars" : [ - ], - "name" : "SCITestReporterStdoutTest", - "pools" : [ - ], - "super" : "TestCase", - "type" : "normal" }