<body><div id="__MailbirdStyleContent" style="font-size: 10pt;font-family: Arial;color: #000000;text-align: left" dir="ltr">
What happens when the collection for keys as a different size than values? Should there be an error? A test could document that behavior. :-)<div><br></div><div>Best,</div><div>Marcel</div><div class="mb_sig"></div><blockquote class='history_container' type='cite' style='border-left-style:solid;border-width:1px; margin-top:20px; margin-left:0px;padding-left:10px;'>
<p style='color: #AAAAAA; margin-top: 10px;'>Am 24.01.2021 16:55:37 schrieb commits@source.squeak.org <commits@source.squeak.org>:</p><div style='font-family:Arial,Helvetica,sans-serif'>A new version of CollectionsTests was added to project The Inbox:<br>http://source.squeak.org/inbox/CollectionsTests-ct.348.mcz<br><br>==================== Summary ====================<br><br>Name: CollectionsTests-ct.348<br>Author: ct<br>Time: 24 January 2021, 4:55:30.561273 pm<br>UUID: 342ca023-4467-d741-b42a-924ae0a72936<br>Ancestors: CollectionsTests-mt.346<br><br>Tests Collections-ct.921 (inbox, Dictionary newFromKeys:values:).<br><br>=============== Diff against CollectionsTests-mt.346 ===============<br><br>Item was added:<br>+ ----- Method: DictionaryTest>>testNewFromKeysValues (in category 'tests - basic') -----<br>+ testNewFromKeysValues<br>+ <br>+ | actual expected |<br>+ actual := Dictionary<br>+ newFromKeys: #(2 3 1)<br>+ values: #(4 5 6).<br>+ expected := Dictionary new<br>+ at: 2 put: 4;<br>+ at: 3 put: 5;<br>+ at: 1 put: 6;<br>+ yourself.<br>+ <br>+ self assert: expected equals: actual.!<br><br>Item was added:<br>+ ----- Method: DictionaryTest>>testNewFromPairs (in category 'tests - basic') -----<br>+ testNewFromPairs<br>+ <br>+ | actual expected |<br>+ actual := Dictionary newFromPairs: {<br>+ #one. 'foo'.<br>+ #two. 2 @ 3 }.<br>+ expected := Dictionary new<br>+ at: #one put: 'foo';<br>+ at: #two put: 2 @ 3;<br>+ yourself.<br>+ <br>+ self assert: expected equals: actual.!<br><br><br></div></blockquote>
</div></body>