Skip to content

Instantly share code, notes, and snippets.

@mabdi
Last active October 13, 2020 15:52
Show Gist options
  • Save mabdi/52378b85c9a916dee8cd92c27ec75512 to your computer and use it in GitHub Desktop.
Save mabdi/52378b85c9a916dee8cd92c27ec75512 to your computer and use it in GitHub Desktop.
| config readable reducer prettifier amplifiedClass targetClasses testClass result failedSelectorInOriginal selection notCoveredInOriginal |
amplifiedClass := RSResizeTest574.
config := SAConfig default.
testClass := amplifiedClass superclass.
targetClasses := testClass smallAmpTargetClasses.
result := testClass suite run.
failedSelectorInOriginal :=(result failures , result expectedDefects
collect: [ :failed | failed class lookupSelector: failed selector ])
asOrderedCollection.
selection := config selection initializeWith: config.
notCoveredInOriginal :=
(selection
initialAnalysisFor: {testClass}
targets: targetClasses
ignore: failedSelectorInOriginal) smallAmpUncovered.
reducer := (config oracleReducion initializeWith: config)
with: amplifiedClass
from: testClass
target: targetClasses
uncovered: notCoveredInOriginal.
reducer ignoredTestMethods: failedSelectorInOriginal.
readable := reducer makeReducedResult.
prettifier := config prettifier initializeWith: config.
prettifier prettify: readable.
SAASTHelper moveClassToFinal: readable.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment