diff --git a/.ci.ston b/.ci.ston index 352c6ca5a..e7fd7e7b4 100644 --- a/.ci.ston +++ b/.ci.ston @@ -6,10 +6,5 @@ SmalltalkCISpec { #directory : 'src', #platforms : [ #pharo ] } - ], - #testing : { - #exclude : { - #packages : [ 'Bloc-Examples.*', 'Bloc-Layout-Examples.*', 'Bloc-Text-Examples.*' ] - } - } + ] } diff --git a/src/Bloc-Examples/BlElementBoundsByScripterTest.class.st b/src/Bloc-Examples/BlElementBoundsByScripterTest.class.st index c6e37424e..54d87d4d4 100644 --- a/src/Bloc-Examples/BlElementBoundsByScripterTest.class.st +++ b/src/Bloc-Examples/BlElementBoundsByScripterTest.class.st @@ -121,6 +121,7 @@ BlElementBoundsByScripterTest >> testBoundsInSpace2 [ { #category : #tests } BlElementBoundsByScripterTest >> testBoundsInSpace3 [ + | aScripter | aScripter := self testBoundsInSpace2. diff --git a/src/Bloc-Text-Examples/BlTextIteratorExamplesTest.class.st b/src/Bloc-Text-Examples/BlTextIteratorExamplesTest.class.st index 4c0fe5638..0800df374 100644 --- a/src/Bloc-Text-Examples/BlTextIteratorExamplesTest.class.st +++ b/src/Bloc-Text-Examples/BlTextIteratorExamplesTest.class.st @@ -4,16 +4,20 @@ Class { #category : #'Bloc-Text-Examples-Model' } +{ #category : #'instance creation' } +BlTextIteratorExamplesTest >> newTextSizeTenAttribute [ + + ^ BlFontSizeAttribute size: 10 +] + { #category : #'instance creation' } BlTextIteratorExamplesTest >> testAttributed_end [ | aText anIterator | aText := 'EarthHelloWorld' asRopedText. - (aText from: 11 to: 15) appendingAdornment: [ - BlElement new - size: 10 @ 10; - background: Color lightGray ]. + + (aText from: 11 to: 15) attribute: self newTextSizeTenAttribute. anIterator := aText iterator. self assert: anIterator position equals: 0. @@ -29,7 +33,8 @@ BlTextIteratorExamplesTest >> testAttributed_end_next_attributed_end_at_1 [ anIterator := self testAttributed_end. anIterator - nextAttributedEnd: [ :eachAttribute | eachAttribute isAdornment ] + nextAttributedEnd: [ :eachAttribute | + eachAttribute = self newTextSizeTenAttribute ] indicesDo: [ :indexStart :indexEnd :theAttributes | aStart := indexStart. anEnd := indexEnd. @@ -51,7 +56,8 @@ BlTextIteratorExamplesTest >> testAttributed_end_next_span_any_at_1 [ anIterator := self testAttributed_end. anIterator - nextSpanAny: [ :eachAttribute | eachAttribute isAdornment ] + nextSpanAny: [ :eachAttribute | + eachAttribute = self newTextSizeTenAttribute ] indicesDo: [ :indexStart :indexEnd :hasAny | aStart := indexStart. anEnd := indexEnd. @@ -73,7 +79,8 @@ BlTextIteratorExamplesTest >> testAttributed_end_next_span_any_at_10 [ anIterator := self testAttributed_end_next_span_any_at_1. anIterator - nextSpanAny: [ :eachAttribute | eachAttribute isAdornment ] + nextSpanAny: [ :eachAttribute | + eachAttribute = self newTextSizeTenAttribute ] indicesDo: [ :indexStart :indexEnd :hasAny | aStart := indexStart. anEnd := indexEnd. @@ -93,10 +100,8 @@ BlTextIteratorExamplesTest >> testAttributed_middle [ | aText anIterator | aText := 'EarthHelloWorld' asRopedText. - (aText from: 6 to: 10) appendingAdornment: [ - BlElement new - size: 10 @ 10; - background: Color lightGray ]. + + (aText from: 6 to: 10) attribute: self newTextSizeTenAttribute. anIterator := aText iterator. self assert: anIterator position equals: 0. @@ -112,7 +117,8 @@ BlTextIteratorExamplesTest >> testAttributed_middle_next_attributed_end_at_1 [ anIterator := self testAttributed_middle. anIterator - nextAttributedEnd: [ :eachAttribute | eachAttribute isAdornment ] + nextAttributedEnd: [ :eachAttribute | + eachAttribute = self newTextSizeTenAttribute ] indicesDo: [ :indexStart :indexEnd :theAttributes | aStart := indexStart. anEnd := indexEnd. @@ -134,7 +140,8 @@ BlTextIteratorExamplesTest >> testAttributed_middle_next_attributed_end_at_10 [ anIterator := self testAttributed_middle_next_attributed_end_at_1. anIterator - nextAttributedEnd: [ :eachAttribute | eachAttribute isAdornment ] + nextAttributedEnd: [ :eachAttribute | + eachAttribute = self newTextSizeTenAttribute ] indicesDo: [ :indexStart :indexEnd :theAttributes | aStart := indexStart. anEnd := indexEnd. @@ -156,7 +163,8 @@ BlTextIteratorExamplesTest >> testAttributed_middle_next_span_any_at_1 [ anIterator := self testAttributed_middle. anIterator - nextSpanAny: [ :eachAttribute | eachAttribute isAdornment ] + nextSpanAny: [ :eachAttribute | + eachAttribute = self newTextSizeTenAttribute ] indicesDo: [ :indexStart :indexEnd :hasAny | aStart := indexStart. anEnd := indexEnd. @@ -178,7 +186,8 @@ BlTextIteratorExamplesTest >> testAttributed_middle_next_span_any_at_10 [ anIterator := self testAttributed_middle_next_span_any_at_5. anIterator - nextSpanAny: [ :eachAttribute | eachAttribute isAdornment ] + nextSpanAny: [ :eachAttribute | + eachAttribute = self newTextSizeTenAttribute ] indicesDo: [ :indexStart :indexEnd :hasAny | aStart := indexStart. anEnd := indexEnd. @@ -200,7 +209,8 @@ BlTextIteratorExamplesTest >> testAttributed_middle_next_span_any_at_5 [ anIterator := self testAttributed_middle_next_span_any_at_1. anIterator - nextSpanAny: [ :eachAttribute | eachAttribute isAdornment ] + nextSpanAny: [ :eachAttribute | + eachAttribute = self newTextSizeTenAttribute ] indicesDo: [ :indexStart :indexEnd :hasAny | aStart := indexStart. anEnd := indexEnd. @@ -220,10 +230,8 @@ BlTextIteratorExamplesTest >> testAttributed_start [ | aText anIterator | aText := 'EarthHelloWorld' asRopedText. - (aText from: 1 to: 5) appendingAdornment: [ - BlElement new - size: 10 @ 10; - background: Color lightGray ]. + + (aText from: 1 to: 5) attribute: self newTextSizeTenAttribute. anIterator := aText iterator. self assert: anIterator position equals: 0. @@ -239,7 +247,8 @@ BlTextIteratorExamplesTest >> testAttributed_start_next_attributed_end_at_1 [ anIterator := self testAttributed_start. anIterator - nextAttributedEnd: [ :eachAttribute | eachAttribute isAdornment ] + nextAttributedEnd: [ :eachAttribute | + eachAttribute = self newTextSizeTenAttribute ] indicesDo: [ :indexStart :indexEnd :theAttributes | aStart := indexStart. anEnd := indexEnd. @@ -261,7 +270,8 @@ BlTextIteratorExamplesTest >> testAttributed_start_next_attributed_end_at_5 [ anIterator := self testAttributed_start_next_attributed_end_at_1. anIterator - nextAttributedEnd: [ :eachAttribute | eachAttribute isAdornment ] + nextAttributedEnd: [ :eachAttribute | + eachAttribute = self newTextSizeTenAttribute ] indicesDo: [ :indexStart :indexEnd :theAttributes | aStart := indexStart. anEnd := indexEnd. @@ -283,7 +293,8 @@ BlTextIteratorExamplesTest >> testAttributed_start_next_span_any_at_1 [ anIterator := self testAttributed_start. anIterator - nextSpanAny: [ :eachAttribute | eachAttribute isAdornment ] + nextSpanAny: [ :eachAttribute | + eachAttribute = self newTextSizeTenAttribute ] indicesDo: [ :indexStart :indexEnd :hasAny | aStart := indexStart. anEnd := indexEnd. @@ -305,7 +316,8 @@ BlTextIteratorExamplesTest >> testAttributed_start_next_span_any_at_5 [ anIterator := self testAttributed_start_next_span_any_at_1. anIterator - nextSpanAny: [ :eachAttribute | eachAttribute isAdornment ] + nextSpanAny: [ :eachAttribute | + eachAttribute = self newTextSizeTenAttribute ] indicesDo: [ :indexStart :indexEnd :hasAny | aStart := indexStart. anEnd := indexEnd.