Check this method.
Open
Nobody has claimed this yet.
bug
TODO
- Dominant language
- Smalltalk
- Stars
- 6
- Forks
- 4
- PR merge metrics
- No merged PRs in 30d
Description
This method from zinc project:
testMultiValues
| dictionary values keys |
dictionary := ZnMultiValueDictionary new.
dictionary at: 'foo' add: 1; at: 'foo' add: 2.
self assert: (dictionary at: 'foo') = #(1 2).
self assert: dictionary keys asArray = #('foo').
values := OrderedCollection new.
keys := OrderedCollection new.
dictionary keysAndValuesDo: [ :key :value | keys add: key. values add: value ].
self assert: values = (OrderedCollection with: 1 with: 2).
self assert: keys = (OrderedCollection with: 'foo' with: 'foo')
is converted to it:
testMultiValues_amp_L20
<madeBySmallAmp>
| dictionary values keys |
dictionary := ZnMultiValueDictionary new.
dictionary := dictionary
at: 'foo' add: 1;
at: 'foo' add: 1.
values := OrderedCollection new.
keys := OrderedCollection new.
dictionary
keysAndValuesDo: [ :key :value |
keys add: key.
values add: value ]
Line 5 of Which does not look correct. Why the dictionary variable is set to the result of Dictionary>>#at:add: ?
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the original testMultiValues example in the issue and compare it with the generated testMultiValues_amp_L20 output. Inspect how small-amp converts the Dictionary>>#at:add: expression, then determine the expected transformed test and verify that the dictionary assignment and repeated values match the source behavior.
Written by the indexing model from the issue text.
Assessment
- Domain
- testing
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100