Marcel Taeumel uploaded a new version of CollectionsTests to project The Trunk: http://source.squeak.org/trunk/CollectionsTests-ct.316.mcz
==================== Summary ====================
Name: CollectionsTests-ct.316 Author: ct Time: 15 August 2019, 11:37:05.878735 pm UUID: ada4c94e-7e83-ff48-82e1-fe587c68f769 Ancestors: CollectionsTests-pre.314
Test Text>>#format: (see Collections-ct.850)
=============== Diff against CollectionsTests-pre.314 ===============
Item was added: + ----- Method: TextTest>>fixturesFormat (in category 'tests') ----- + fixturesFormat + + ^ { + { '{ } \ foo {1} bar {2}' asText + addAttribute: TextEmphasis bold from: 3 to: 10; + addAttribute: TextEmphasis italic from: 12 to: 18; + yourself. + #(12 'string'). + '{ } \ foo 12 bar string' asText + addAttribute: TextEmphasis bold from: 2 to: 7; + addAttribute: TextEmphasis italic from: 9 to: 14; + yourself }. + { '{ } \ foo {2} bar {1}' asText. + { 'string' asText + addAttribute: TextEmphasis bold from: 2 to: 4; + yourself. + 12 }. + '{ } \ foo 12 bar string' asText + addAttribute: TextEmphasis bold from: 19 to: 21; + yourself }. + { '{1}' asText. + #(). + '{1}' asText }. + { '{1}{1}' asText allBold. + { $a asText + addAttribute: TextEmphasis italic; + yourself }. + '{1}a' asText allBold + addAttribute: TextEmphasis italic from: 4 to: 4; + yourself }. + { 'foo' asText. + #(). + 'foo' asText }. + }!
Item was added: + ----- Method: TextTest>>fixturesFormatErrors (in category 'tests') ----- + fixturesFormatErrors + + ^ #( + '{1 }' + '{1abc}' + '{ 1}' + '{ 1.0 }' + '{1' + '{1 foo' + '{2}' + '{0}' + '{-0}' + '{-1}' + )!
Item was added: + ----- Method: TextTest>>testFormat (in category 'tests') ----- + testFormat + + self fixturesFormat do: [ :fixture | | expectedResult actualResult | + expectedResult := fixture third. + actualResult := fixture first format: fixture second. + self + assert: expectedResult equals: actualResult; + assert: expectedResult runs size equals: actualResult runs size. + 1 to: expectedResult size do: [ :i | + self + assert: (expectedResult attributesAt: i) asSet + equals: (actualResult attributesAt: i) asSet ] ]!
Item was added: + ----- Method: TextTest>>testFormatErrors (in category 'tests') ----- + testFormatErrors + + self fixturesFormatErrors do: [ :each | + self should: [ each asText format: { 'x' } ] raise: Error ]!
packages@lists.squeakfoundation.org