Marcel Taeumel uploaded a new version of CollectionsTests to project The Trunk: http://source.squeak.org/trunk/CollectionsTests-mt.399.mcz
==================== Summary ====================
Name: CollectionsTests-mt.399 Author: mt Time: 10 August 2023, 9:59:07.68462 am UUID: ad413358-1194-fc41-b9f4-277c27e50588 Ancestors: CollectionsTests-ct.398
Tests for Collections-mt.1049
=============== Diff against CollectionsTests-ct.398 ===============
Item was added: + ----- Method: BagTest>>testWithoutDuplicates (in category 'tests') ----- + testWithoutDuplicates + + | in out | + in := Bag new + addAll: #(1 3 5 7 9 1 3 5 7 9 2 4 6 8 10 2 4 6 8 10); + yourself. + out := Bag new + addAll: #(1 3 5 7 9 2 4 6 8 10); + yourself. + self assert: out equals: in withoutDuplicates.!
Item was added: + ----- Method: DictionaryTest>>testWithoutDuplicateValues (in category 'tests') ----- + testWithoutDuplicateValues + + | in | + in := Dictionary withAll: {#a->1 . #b->3 . #c->5 . #d->7 . #e->9 . #f->1 . #g->3 . #h->5 . #i->7 . #j->9 . #k->2 . #l->4 . #m->6 . #n->8 . #o->10 . #p->2 . #q->4 . #r->6 . #s->8 . #t->10}. + self "ignore which keys where dropped" + assert: #(1 2 3 4 5 6 7 8 9 10) + equals: in withoutDuplicateValues values sorted.!
Item was added: + ----- Method: DictionaryTest>>testWithoutDuplicates (in category 'tests') ----- + testWithoutDuplicates + + | in | + in := Dictionary withAll: {#a->1 . #b->3 . #c->5 . #d->7 . #e->9 . #f->1 . #g->3 . #h->5 . #i->7 . #j->9 . #k->2 . #l->4 . #m->6 . #n->8 . #o->10 . #p->2 . #q->4 . #r->6 . #s->8 . #t->10}. + + self assert: in equals: in withoutDuplicates. + self assert: in identical: in withoutDuplicates. + + self assert: in equals: in copyWithoutDuplicates. + self deny: in identical: in copyWithoutDuplicates.!
Item was added: + ----- Method: OrderedDictionaryTest>>testWithoutDuplicateValues (in category 'tests - copying') ----- + testWithoutDuplicateValues + + | in out | + in := OrderedDictionary withAll: {#a->1 . #b->3 . #c->5 . #d->7 . #e->9 . #f->1 . #g->3 . #h->5 . #i->7 . #j->9 . #k->2 . #l->4 . #m->6 . #n->8 . #o->10 . #p->2 . #q->4 . #r->6 . #s->8 . #t->10}. + out := OrderedDictionary withAll: {#a->1 . #b->3 . #c->5 . #d->7 . #e->9 . #k->2 . #l->4 . #m->6 . #n->8 . #o->10}. + self assert: out equals: in withoutDuplicateValues.!
Item was added: + ----- Method: OrderedDictionaryTest>>testWithoutDuplicates (in category 'tests - copying') ----- + testWithoutDuplicates + + | in | + in := OrderedDictionary withAll: {#a->1 . #b->3 . #c->5 . #d->7 . #e->9 . #f->1 . #g->3 . #h->5 . #i->7 . #j->9 . #k->2 . #l->4 . #m->6 . #n->8 . #o->10 . #p->2 . #q->4 . #r->6 . #s->8 . #t->10}. + + self assert: in equals: in withoutDuplicates. + self assert: in identical: in withoutDuplicates. + + self assert: in equals: in copyWithoutDuplicates. + self deny: in identical: in copyWithoutDuplicates.!
Item was added: + ----- Method: SetTest>>testWithoutDuplicates (in category 'tests') ----- + testWithoutDuplicates + + | in out | + in := Set new + addAll: #(1 3 5 7 9 1 3 5 7 9 2 4 6 8 10 2 4 6 8 10); + yourself. + out := Set new + addAll: #(1 3 5 7 9 2 4 6 8 10); + yourself. + + self assert: out equals: in withoutDuplicates. + self assert: in equals: in withoutDuplicates. + self assert: in equals: in copyWithoutDuplicates. + + self assert: in identical: in withoutDuplicates. + self deny: in identical: in copyWithoutDuplicates. !
packages@lists.squeakfoundation.org