Eliot Miranda uploaded a new version of Tests to project The Trunk:
http://source.squeak.org/trunk/Tests-eem.374.mcz ==================== Summary ==================== Name: Tests-eem.374 Author: eem Time: 3 April 2017, 2:08:08.542853 pm UUID: 8ff1a1ea-af44-4578-8594-782f63d0f0eb Ancestors: Tests-eem.373 Revamp the DecompilerTests given the changes in Compiler-eem.337. Exclude classes in EToys and a few others from the decompiler tests for now. =============== Diff against Tests-eem.373 =============== Item was changed: ----- Method: DecompilerTests>>checkDecompileMethod: (in category 'utilities') ----- checkDecompileMethod: oldMethod | cls selector oldMethodNode methodNode newMethod oldCodeString newCodeString | cls := oldMethod methodClass. selector := oldMethod selector. oldMethodNode := (cls decompilerClass new withTempNames: oldMethod methodNode schematicTempNamesString) decompile: selector in: cls method: oldMethod methodForDecompile. [oldMethodNode properties includesKey: #warning] whileTrue: [oldMethodNode properties removeKey: #warning]. oldCodeString := oldMethodNode decompileString. methodNode := [cls newCompiler compile: oldCodeString in: cls notifying: nil ifFail: []] on: SyntaxErrorNotification do: [:ex| ex errorMessage = 'Cannot store into' ifTrue: [ex return: #badStore]. ex pass]. "Ignore cannot store into block arg errors; they're not our issue." methodNode ~~ #badStore ifTrue: [newMethod := methodNode generate. newCodeString := ((cls decompilerClass new withTempNames: methodNode schematicTempNamesString) decompile: selector in: cls method: newMethod methodForDecompile) decompileString. "(StringHolder new textContents: (TextDiffBuilder buildDisplayPatchFrom: oldCodeString to: newCodeString)) openLabel: 'Decompilation Differences for ', cls name,'>>',selector" "(StringHolder new textContents: (TextDiffBuilder buildDisplayPatchFrom: oldMethod abstractSymbolic to: newMethod abstractSymbolic)) openLabel: 'Bytecode Differences for ', cls name,'>>',selector" + self assert: (oldCodeString = newCodeString + or: [(Scanner new scanTokens: oldCodeString) = (Scanner new scanTokens: newCodeString)]) - self assert: oldCodeString = newCodeString description: cls name asString, ' ', selector asString resumable: true]! Item was changed: ----- Method: DecompilerTests>>classNames (in category 'utilities') ----- classNames + "A list of the classes in most of the base packages; excluding EToys arbitrarily for now" + ^Smalltalk globals allClassesAndTraits + select: + [:classOrTrait| + #( 'Balloon' + 'Chronology' 'Collections' 'CommandLine' 'Compiler' 'Compression' + 'Environments' 'Exceptions' + 'Files' + 'GetText' 'Graphics' 'Help-' 'HelpSystem-' + 'Installer-Core' + 'Kernel-' 'KernelTests-' + 'Monticello' + 'Morphic-' 'MorphicExtras-' 'MorphicExtrasTests-' 'MorphicTests-' + 'Multilingual' 'MultilingualTests' + 'Nebraska' 'Network' 'NetworkTests' + 'PackageInfo-Base' 'PreferenceBrowser' 'Protocols' + 'Regex' + 'ReleaseBuilder' + 'SMBase' 'SMLoader' 'ST80' 'ST80Tests' 'ST80Tools' 'SUnit' 'ScriptLoader' 'Services-Base' 'Shout' + 'Sound' 'Squeak-Version' 'SqueakSSL' 'System' + 'Tests' 'ToolBuilder' 'Tools' 'Traits' 'TrueType' + 'Universes' 'UpdateStream' 'VersionNumber' + 'WebClient-' + 'XML-') anySatisfy: + [:packageRoot| + classOrTrait category beginsWith: packageRoot]] + thenCollect: + [:classOrTrait| classOrTrait name]! - - ^Smalltalk globals classAndTraitNames! Item was changed: ----- Method: DecompilerTests>>decompilerFailures (in category 'utilities') ----- decompilerFailures "Here is the list of failures: either a syntax error, a hard error or some failure to decompile correctly. Collected via DecompilerTestFailuresCollector new computeFailures." "class name, selector, error class name or nil" ^ #( #(Behavior toolIconSelector: TestFailure) #(BrowserCommentTextMorph showPane SyntaxErrorNotification) - #(ClassDescription replaceSilently:to: SyntaxErrorNotification) #(CodeHolder getSelectorAndSendQuery:to:with: SyntaxErrorNotification) - #(Date printOn: TestFailure) #(DecompilerTests testDecompileUnreachableParameter Error) - #(FontImporterTool fontFromFamily: SyntaxErrorNotification) "same-name block-local temps in optimized blocks" #(HttpUrl checkAuthorization:retry: TestFailure) - #(LargeNegativeIntegerTest testReplaceFromToWithStartingAt SyntaxErrorNotification) "same-name block-local temps in optimized blocks" - #(LargePositiveIntegerTest testReplaceFromToWithStartingAt SyntaxErrorNotification) "same-name block-local temps in optimized blocks" - #(MailComposition breakLinesInMessage: SyntaxErrorNotification) #(MCConfigurationBrowser post SyntaxErrorNotification) #(MVCToolBuilder setLayout:in: SyntaxErrorNotification) "same-name block-local temps in optimized blocks" + #(ParseNodeBuilder variable: TestFailure) "Almost fully returning if's result in a nil node." - #(ParagraphEditor inOutdent:delta: SyntaxErrorNotification) #(PNGReadWriter copyPixelsGray: SyntaxErrorNotification) #(ProtoObjectTest testIfNilIfNotNil SyntaxErrorNotification) #(ProtoObjectTest testIfNotNil SyntaxErrorNotification) + #(ProtoObjectTest testIfNotNilIfNil SyntaxErrorNotification) - #(ProtoObjectTest testIfNotNilIfNil SyntaxErrorNotification) - #(RxsCharSet enumerablePartPredicateIgnoringCase: SyntaxErrorNotification) - #(ScaledDecimalTest testConvertFromFraction SyntaxErrorNotification) "local/non-local temps" #(SHMCClassDefinition withAllSuperclassesDo: SyntaxErrorNotification) "same-name block-local temps in optimized blocks" - #(StandardScriptingSystem holderWithAlphabet SyntaxErrorNotification) "same-name block-local temps in optimized blocks" - #(SyntaxMorph mouseEnterDragging: SyntaxErrorNotification) - #(SystemWindow convertAlignment SyntaxErrorNotification) - #(TextEditor inOutdent:delta: SyntaxErrorNotification) #(TextURL actOnClickFor: TestFailure) #(TTContourConstruction segmentsDo: SyntaxErrorNotification) "Worth fixing; these two are mistaken conversion from a whileTrue: to a to:do: but the index is used outside the whileTrue:" #(TTFontReader processHorizontalMetricsTable:length: SyntaxErrorNotification) #(WeakSet scanForLoadedSymbol: TestFailure))! |
Free forum by Nabble | Edit this page |