From 4ac0b317433daf161edfc0555d694d9c8a24185d Mon Sep 17 00:00:00 2001 From: Christoph Thiede Date: Sat, 21 Dec 2024 20:24:58 +0100 Subject: [PATCH] result printing: display variables of summary, remove redundant #asString override --- .../SLResult.class/instance/asString.st | 4 ---- .../SLResult.class/methodProperties.json | 1 - .../SLSummaryResult.class/instance/formatAsSummary.st | 8 ++++++-- .../SLSummaryResult.class/methodProperties.json | 2 +- .../instance/asSL2ResultsFor..st | 2 +- .../SLSummaryResult.extension/methodProperties.json | 2 +- 6 files changed, 9 insertions(+), 10 deletions(-) delete mode 100644 packages/SwaLint-Core.package/SLResult.class/instance/asString.st diff --git a/packages/SwaLint-Core.package/SLResult.class/instance/asString.st b/packages/SwaLint-Core.package/SLResult.class/instance/asString.st deleted file mode 100644 index 4e498403..00000000 --- a/packages/SwaLint-Core.package/SLResult.class/instance/asString.st +++ /dev/null @@ -1,4 +0,0 @@ -displaying -asString - - ^ super asString, '(', self valueAsString,')' \ No newline at end of file diff --git a/packages/SwaLint-Core.package/SLResult.class/methodProperties.json b/packages/SwaLint-Core.package/SLResult.class/methodProperties.json index 94b481f3..4f96f15c 100644 --- a/packages/SwaLint-Core.package/SLResult.class/methodProperties.json +++ b/packages/SwaLint-Core.package/SLResult.class/methodProperties.json @@ -14,7 +14,6 @@ "instance" : { "=" : "NA 7/16/2015 12:38", "applyColorRule:" : "NA 7/16/2015 15:31", - "asString" : "AT 5/8/2008 10:07", "cacheColor" : "topa 4/19/2010 10:09", "cacheValueAsString" : "AT 5/26/2008 23:54", "colorBlack" : "AT 5/17/2008 16:46", diff --git a/packages/SwaLint-Core.package/SLSummaryResult.class/instance/formatAsSummary.st b/packages/SwaLint-Core.package/SLSummaryResult.class/instance/formatAsSummary.st index c8814c31..6b3dee0d 100644 --- a/packages/SwaLint-Core.package/SLSummaryResult.class/instance/formatAsSummary.st +++ b/packages/SwaLint-Core.package/SLSummaryResult.class/instance/formatAsSummary.st @@ -2,5 +2,9 @@ displaying formatAsSummary self valueFormatRule: [ :v | - v rounded asString, - ' occurence', ((v = 1) ifTrue: [''] ifFalse: ['s'])]. \ No newline at end of file + | format | + format := v rounded asString, + ' occurence', ((v = 1) ifTrue: [''] ifFalse: ['s']). + (self testObject variables select: [:variable | self selectForSummary: variable]) ifNotEmpty: [:variables | + format := format , (' ({1})' format: {(variables collect: #variable) asCommaStringAnd})]. + format]. \ No newline at end of file diff --git a/packages/SwaLint-Core.package/SLSummaryResult.class/methodProperties.json b/packages/SwaLint-Core.package/SLSummaryResult.class/methodProperties.json index dd61bd3e..b8bf148d 100644 --- a/packages/SwaLint-Core.package/SLSummaryResult.class/methodProperties.json +++ b/packages/SwaLint-Core.package/SLSummaryResult.class/methodProperties.json @@ -6,7 +6,7 @@ "instance" : { "condition:" : "AT 2/2/2008 11:24", "defaultCondition" : "AT 5/8/2008 12:21", - "formatAsSummary" : "NR 1/28/2008 14:25", + "formatAsSummary" : "ct 12/21/2024 19:50", "hasDetails" : "ct 12/19/2024 04:41", "initializeFormatRule" : "AT 2/2/2008 12:13", "initializeShowRule" : "AT 2/2/2008 12:13", diff --git a/packages/SwaLintBrowser.package/SLSummaryResult.extension/instance/asSL2ResultsFor..st b/packages/SwaLintBrowser.package/SLSummaryResult.extension/instance/asSL2ResultsFor..st index 9e3ba0b4..f77129ab 100644 --- a/packages/SwaLintBrowser.package/SLSummaryResult.extension/instance/asSL2ResultsFor..st +++ b/packages/SwaLintBrowser.package/SLSummaryResult.extension/instance/asSL2ResultsFor..st @@ -10,7 +10,7 @@ asSL2ResultsFor: aSL2Test (testMethod asSL2ResultFor: aSL2Test with: (testMethod resultOf: self summarizedTest))]. (self testObject variables - anySatisfy: [:testMethod | self selectForSummary: testMethod]) + anySatisfy: [:variable | self selectForSummary: variable]) ifTrue: [stream nextPut: (self testObject asSL2ResultFor: aSL2Test with: self)]]. diff --git a/packages/SwaLintBrowser.package/SLSummaryResult.extension/methodProperties.json b/packages/SwaLintBrowser.package/SLSummaryResult.extension/methodProperties.json index 86c720b7..194614fc 100644 --- a/packages/SwaLintBrowser.package/SLSummaryResult.extension/methodProperties.json +++ b/packages/SwaLintBrowser.package/SLSummaryResult.extension/methodProperties.json @@ -2,4 +2,4 @@ "class" : { }, "instance" : { - "asSL2ResultsFor:" : "ct 12/19/2024 04:48" } } + "asSL2ResultsFor:" : "ct 12/21/2024 19:47" } }