Tobias Pape uploaded a new version of CollectionsTests to project The Trunk:
http://source.squeak.org/trunk/CollectionsTests-topa.273.mcz ==================== Summary ==================== Name: CollectionsTests-topa.273 Author: topa Time: 9 February 2017, 7:50:04.444895 pm UUID: c65eaa03-cc26-4ba6-a648-962d6a3ecf23 Ancestors: CollectionsTests-pre.272 Test for htmlifying DoIts from Collections-topa.732 =============== Diff against CollectionsTests-pre.272 =============== Item was added: + ----- Method: HtmlReadWriterTest>>test07CodeRoundTrip (in category 'tests') ----- + test07CodeRoundTrip + + | textWithDoIt | + textWithDoIt := self textWithDoIt. + self assert: textWithDoIt equals: textWithDoIt printHtmlString asTextFromHtml + ! Item was added: + ----- Method: HtmlReadWriterTest>>test08MultilineCode (in category 'tests') ----- + test08MultilineCode + + { '<code> + <pre>3 + 7. + 3 > 4.</pre></code>' . + Text string: '3 + 7. + 3 > 4.' runs: (RunArray runs: #(13 ) values: { {TextDoIt evalString: '3 + 7. + 3 > 4.' } } ) + } pairsDo: [:expectedHtml :expectedText | + + self convertHtml: expectedHtml. + self assert: expectedText string equals: text string. + self assert: expectedText runs equals: text runs. + + self convertText: expectedText. + self assert: expectedHtml equals: html].! Item was added: + ----- Method: HtmlReadWriterTest>>textWithDoIt (in category 'tests') ----- + textWithDoIt + " Version of TextAction>>emphasizeScanner: with a Doit on the third line " + | doit | + doit := TextDoIt basicNew instVarAt: 1 put: 'Purple ifNil: [Purple := self userInterfaceTheme color ifNil: [Color r: 0.4 g: 0.0 b: 1]].'; yourself. + ^ (Text string: 'emphasizeScanner: scanner + "Set the emphasis for text display" + Purple ifNil: [Purple := self userInterfaceTheme color ifNil: [Color r: 0.4 g: 0.0 b: 1]]. + scanner textColor: Purple.' runs: (RunArray runs: #(17 1 7 1 35 1 6 1 6 1 1 6 1 2 1 4 1 18 1 5 1 6 1 1 5 1 2 1 3 1 2 1 3 1 2 1 1 1 1 1 1 7 1 10 1 6 1 ) values: ((Array new: 47) at: 1 put: ((Array new: 1) at: 1 put: (TextEmphasis basicNew instVarAt: 1 put: 1; instVarAt: 2 put: true; yourself); yourself); at: 2 put: ((Array new: 1) at: 1 put: (TextColor basicNew instVarAt: 1 put: (Color r: 0.0 g: 0.0 b: 0.0); yourself); yourself); at: 3 put: ((Array new: 1) at: 1 put: (TextColor basicNew instVarAt: 1 put: (Color r: 0.0 g: 0.0 b: 0.5); yourself); yourself); at: 4 put: ((Array new: 1) at: 1 put: (TextColor basicNew instVarAt: 1 put: (Color r: 0.0 g: 0.0 b: 0.0); yourself); yourself); at: 5 put: ((Array new: 1) at: 1 put: (TextColor basicNew instVarAt: 1 put: (Color r: 0.0 g: 0.5 b: 0.5); yourself); yourself); at: 6 put: ((Array new: 1) at: 1 put: (TextColor basicNew instVarAt: 1 put: (Color r: 0.0 g: 0.0 b: 0.0); yourself); yourself); at: 7 put: ((Array new: 2) at: 1 put: (TextColor ba sicNew instVarAt: 1 put: (Color r: 0.25 g: 0.25 b: 0.25); yourself); at: 2 put: doit; yourself); at: 8 put: ((Array new: 2) at: 1 put: (TextColor basicNew instVarAt: 1 put: (Color r: 0.0 g: 0.0 b: 0.0); yourself); at: 2 put: doit; yourself); at: 9 put: ((Array new: 2) at: 1 put: (TextColor basicNew instVarAt: 1 put: (Color r: 0.0 g: 0.0 b: 0.5); yourself); at: 2 put: doit; yourself); at: 10 put: ((Array new: 2) at: 1 put: (TextColor basicNew instVarAt: 1 put: (Color r: 0.0 g: 0.0 b: 0.0); yourself); at: 2 put: doit; yourself); at: 11 put: ((Array new: 2) at: 1 put: (TextColor basicNew instVarAt: 1 put: (Color r: 0.0 g: 0.0 b: 0.0); yourself); at: 2 put: doit; yourself); at: 12 put: ((Array new: 2) at: 1 put: (TextColor basicNew instVarAt: 1 put: (Color r: 0.25 g: 0.25 b: 0.25); yourself); at: 2 put: doit; yourself); at: 13 put: ((Array new: 2) at: 1 put: (TextColor basicNew instVarAt: 1 put: (Color r: 0.0 g: 0.0 b: 0.0); yourself); at: 2 put: doit; yourself); at: 14 put: ((Array new : 2) at: 1 put: (TextEmphasis basicNew instVarAt: 1 put: 1; instVarAt: 2 put: true; yourself); at: 2 put: doit; yourself); at: 15 put: ((Array new: 2) at: 1 put: (TextColor basicNew instVarAt: 1 put: (Color r: 0.0 g: 0.0 b: 0.0); yourself); at: 2 put: doit; yourself); at: 16 put: ((Array new: 2) at: 1 put: (TextColor basicNew instVarAt: 1 put: (Color r: 0.5 g: 0.0 b: 0.0); yourself); at: 2 put: doit; yourself); at: 17 put: ((Array new: 2) at: 1 put: (TextColor basicNew instVarAt: 1 put: (Color r: 0.0 g: 0.0 b: 0.0); yourself); at: 2 put: doit; yourself); at: 18 put: ((Array new: 2) at: 1 put: (TextColor basicNew instVarAt: 1 put: (Color r: 0.0 g: 0.0 b: 0.5); yourself); at: 2 put: doit; yourself); at: 19 put: ((Array new: 2) at: 1 put: (TextColor basicNew instVarAt: 1 put: (Color r: 0.0 g: 0.0 b: 0.0); yourself); at: 2 put: doit; yourself); at: 20 put: ((Array new: 2) at: 1 put: (TextColor basicNew instVarAt: 1 put: (Color r: 0.0 g: 0.0 b: 0.5); yourself); at: 2 put: doit; yourself) ; at: 21 put: ((Array new: 2) at: 1 put: (TextColor basicNew instVarAt: 1 put: (Color r: 0.0 g: 0.0 b: 0.0); yourself); at: 2 put: doit; yourself); at: 22 put: ((Array new: 2) at: 1 put: (TextColor basicNew instVarAt: 1 put: (Color r: 0.0 g: 0.0 b: 0.5); yourself); at: 2 put: doit; yourself); at: 23 put: ((Array new: 2) at: 1 put: (TextColor basicNew instVarAt: 1 put: (Color r: 0.0 g: 0.0 b: 0.0); yourself); at: 2 put: doit; yourself); at: 24 put: ((Array new: 2) at: 1 put: (TextColor basicNew instVarAt: 1 put: (Color r: 0.0 g: 0.5 b: 0.0); yourself); at: 2 put: doit; yourself); at: 25 put: ((Array new: 2) at: 1 put: (TextColor basicNew instVarAt: 1 put: (Color r: 0.0 g: 0.0 b: 0.0); yourself); at: 2 put: doit; yourself); at: 26 put: ((Array new: 2) at: 1 put: (TextColor basicNew instVarAt: 1 put: (Color r: 0.0 g: 0.0 b: 0.0); yourself); at: 2 put: doit; yourself); at: 27 put: ((Array new: 2) at: 1 put: (TextColor basicNew instVarAt: 1 put: (Color r: 0.0 g: 0.0 b: 0.5); yourself); a t: 2 put: doit; yourself); at: 28 put: ((Array new: 2) at: 1 put: (TextColor basicNew instVarAt: 1 put: (Color r: 0.0 g: 0.0 b: 0.0); yourself); at: 2 put: doit; yourself); at: 29 put: ((Array new: 2) at: 1 put: (TextColor basicNew instVarAt: 1 put: (Color r: 0.5 g: 0.0 b: 0.0); yourself); at: 2 put: doit; yourself); at: 30 put: ((Array new: 2) at: 1 put: (TextColor basicNew instVarAt: 1 put: (Color r: 0.0 g: 0.0 b: 0.0); yourself); at: 2 put: doit; yourself); at: 31 put: ((Array new: 2) at: 1 put: (TextColor basicNew instVarAt: 1 put: (Color r: 0.0 g: 0.0 b: 0.5); yourself); at: 2 put: doit; yourself); at: 32 put: ((Array new: 2) at: 1 put: (TextColor basicNew instVarAt: 1 put: (Color r: 0.0 g: 0.0 b: 0.0); yourself); at: 2 put: doit; yourself); at: 33 put: ((Array new: 2) at: 1 put: (TextColor basicNew instVarAt: 1 put: (Color r: 0.5 g: 0.0 b: 0.0); yourself); at: 2 put: doit; yourself); at: 34 put: ((Array new: 2) at: 1 put: (TextColor basicNew instVarAt: 1 put: (Color r: 0.0 g: 0.0 b: 0.0); yourself); at: 2 put: doit; yourself); at: 35 put: ((Array new: 2) at: 1 put: (TextColor basicNew instVarAt: 1 put: (Color r: 0.0 g: 0.0 b: 0.5); yourself); at: 2 put: doit; yourself); at: 36 put: ((Array new: 2) at: 1 put: (TextColor basicNew instVarAt: 1 put: (Color r: 0.0 g: 0.0 b: 0.0); yourself); at: 2 put: doit; yourself); at: 37 put: ((Array new: 2) at: 1 put: (TextColor basicNew instVarAt: 1 put: (Color r: 0.5 g: 0.0 b: 0.0); yourself); at: 2 put: doit; yourself); at: 38 put: ((Array new: 2) at: 1 put: (TextColor basicNew instVarAt: 1 put: (Color r: 0.0 g: 0.5 b: 0.0); yourself); at: 2 put: doit; yourself); at: 39 put: ((Array new: 2) at: 1 put: (TextColor basicNew instVarAt: 1 put: (Color r: 0.0 g: 0.0 b: 0.0); yourself); at: 2 put: doit; yourself); at: 40 put: ((Array new: 2) at: 1 put: (TextColor basicNew instVarAt: 1 put: (Color r: 0.0 g: 0.0 b: 0.0); yourself); at: 2 put: doit; yourself); at: 41 put: ((Array new: 1) at: 1 put: (TextColor basicNew instVarAt: 1 put: (Color r: 0.0 g: 0.0 b: 0.0); yourself); yourself); at: 42 put: ((Array new: 1) at: 1 put: (TextColor basicNew instVarAt: 1 put: (Color r: 0.0 g: 0.0 b: 0.5); yourself); yourself); at: 43 put: ((Array new: 1) at: 1 put: (TextColor basicNew instVarAt: 1 put: (Color r: 0.0 g: 0.0 b: 0.0); yourself); yourself); at: 44 put: ((Array new: 1) at: 1 put: (TextColor basicNew instVarAt: 1 put: (Color r: 0.0 g: 0.0 b: 0.5); yourself); yourself); at: 45 put: ((Array new: 1) at: 1 put: (TextColor basicNew instVarAt: 1 put: (Color r: 0.0 g: 0.0 b: 0.0); yourself); yourself); at: 46 put: ((Array new: 1) at: 1 put: (TextColor basicNew instVarAt: 1 put: (Color r: 0.25 g: 0.25 b: 0.25); yourself); yourself); at: 47 put: ((Array new: 1) at: 1 put: (TextColor basicNew instVarAt: 1 put: (Color r: 0.0 g: 0.0 b: 0.0); yourself); yourself); yourself)))! |
Free forum by Nabble | Edit this page |