The Trunk: EToys-ct.370.mcz

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

The Trunk: EToys-ct.370.mcz

commits-2
Marcel Taeumel uploaded a new version of EToys to project The Trunk:
http://source.squeak.org/trunk/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.!