Skip to content

Commit ad8d9c3

Browse files
committed
improve coverage of SlotList class
1 parent 02cf23b commit ad8d9c3

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

test/org/osflash/signals/SlotListTest.test.ts

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,14 @@ describe("SlotListTest", () => {
4444
assert.equal(0, SlotList.NIL.length);
4545
});
4646

47+
it("NIL_can_not_append_a_new_slot", () => {
48+
let list: SlotList = SlotList.NIL.append(slotA);
49+
// list should be a new SlotList with only one element
50+
assert.equal(1, list.length);
51+
// append a element to NIL should not change it's length
52+
assert.equal(0, SlotList.NIL.length);
53+
});
54+
4755
it("tail_defaults_to_NIL_if_omitted_in_constructor", () => {
4856
const noTail: SlotList = new SlotList(slotA);
4957
assert.equal(SlotList.NIL, noTail.tail);

0 commit comments

Comments
 (0)