[squeak-dev] The Inbox: EToys-ct.370.mcz

commits at source.squeak.org commits at source.squeak.org
Tue Oct 15 20:00:53 UTC 2019


A new version of EToys was added to project The Inbox:
http://source.squeak.org/inbox/EToys-ct.370.mcz

==================== Summary ====================

Name: EToys-ct.370
Author: ct
Time: 15 October 2019, 10:00:31.84083 pm
UUID: 8acf5f1b-6545-1146-b173-821ef32c3322
Ancestors: EToys-ct.369

Tests conversion between ParseNodes and tiles

=============== Diff against EToys-ct.369 ===============

Item was added:
+ TestCase subclass: #ScriptEditorMorphTest
+ 	instanceVariableNames: 'editor minimalMethod player'
+ 	classVariableNames: ''
+ 	poolDictionaries: ''
+ 	category: 'Etoys-Tests'!

Item was added:
+ ----- Method: ScriptEditorMorphTest>>exampleMinimalPlayerCode (in category 'accessing') -----
+ exampleMinimalPlayerCode
+ 
+ 	self forward: 6 * 7.
+ 	self turn: 6.
+ 	self forward: 7.
+ 	self getIsUnderMouse ifFalse: [self abandon].
+ 	"self color: (Color r: 1 g: 0.6 b: 0).
+ 	[[''''''''] cull: 42] onDNU: #foo do: #ba."!

Item was added:
+ ----- Method: ScriptEditorMorphTest>>examplePlayerCode (in category 'accessing') -----
+ examplePlayerCode
+ 
+ 	self forward: 6 * 7.
+ 	self
+ 		turn: 6;
+ 		forward: 7.
+ 	self getIsUnderMouse ifFalse: [self abandon].
+ 	"self color: (Color fromString: '#ff9900').
+ 	[[''''''''] cull: 42] onDNU: #foo do: #ba."!

Item was added:
+ ----- Method: ScriptEditorMorphTest>>setUp (in category 'running') -----
+ setUp
+ 
+ 	super setUp.
+ 	
+ 	player := Morph new assuredPlayer.
+ 	minimalMethod := (self class lookupSelector: #exampleMinimalPlayerCode) decompile.!

Item was added:
+ ----- Method: ScriptEditorMorphTest>>tearDown (in category 'running') -----
+ tearDown
+ 
+ 	[editor ifNotNil: #destroyScript] valueSuppressingMessages: #('*destroy*').
+ 	super tearDown.!

Item was added:
+ ----- Method: ScriptEditorMorphTest>>testCodeToTileAndBack (in category 'testing') -----
+ testCodeToTileAndBack
+ 
+ 	| templateMethod |
+ 	templateMethod := (self class lookupSelector: #examplePlayerCode) decompile.
+ 	editor := templateMethod asScriptEditorFor: player.
+ 	self
+ 		assert: minimalMethod block printString
+ 		equals: (player class lookupSelector: #examplePlayerCode) decompile block printString!

Item was added:
+ ----- Method: ScriptEditorMorphTest>>testMinimalCodeToTileAndBack (in category 'testing') -----
+ testMinimalCodeToTileAndBack
+ 
+ 	editor := minimalMethod asScriptEditorFor: player.
+ 	self
+ 		assert: minimalMethod block printString
+ 		equals: (player class lookupSelector: #exampleMinimalPlayerCode) decompile block printString.!



More information about the Squeak-dev mailing list