Skip to content

Commit dd48abd

Browse files
authored
Merge pull request #12 from OpenSmock/fix_innerimageid
Fix inner image id
2 parents b7363a7 + d63d521 commit dd48abd

File tree

2 files changed

+29
-1
lines changed

2 files changed

+29
-1
lines changed

src/Toplo-Serialization-Stash/ToImage.extension.st

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,5 +4,10 @@ Extension { #name : #ToImage }
44
ToImage >> stashAccessorsForInnerImage [
55

66
<stashAccessors>
7-
^ { #innerImage }
7+
self innerImage ifNil: [ ^ { } ].
8+
^ {
9+
#innerImage.
10+
[ :e |
11+
'innerImageDo: [ :i | i id: <1p> ]' expandMacrosWith:
12+
self innerImage id ] onlySetOnStash }
813
]

src/Toplo-Serialization-Tests/ToSerializerTest.class.st

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -317,6 +317,29 @@ ToSerializerTest >> testToCheckbox4 [
317317
(element childAt: 3)) ]
318318
]
319319

320+
{ #category : #tests }
321+
ToSerializerTest >> testToImage1 [
322+
323+
| origin |
324+
origin := ToImage new.
325+
326+
self
327+
test: origin
328+
on: [ :element |
329+
self assert: element innerImage id equals: #emptyImage ]
330+
]
331+
332+
{ #category : #tests }
333+
ToSerializerTest >> testToImage2 [
334+
335+
| origin |
336+
origin := ToImage inner: (ToSandBox pathCheckSVG).
337+
338+
self
339+
test: origin
340+
on: [ :element | self assert: element innerImage id equals: #svgPath ]
341+
]
342+
320343
{ #category : #tests }
321344
ToSerializerTest >> testToLabel [
322345

0 commit comments

Comments
 (0)