fixing names
This commit is contained in:
parent
90fdc7aa06
commit
17b5708d59
12 changed files with 10 additions and 22 deletions
|
|
@ -1,34 +0,0 @@
|
|||
import ArrayList from "@code/array-list";
|
||||
|
||||
test("array-list", function() {
|
||||
const list = new ArrayList<number>(3);
|
||||
|
||||
list.add(5);
|
||||
list.add(7);
|
||||
list.add(9);
|
||||
|
||||
expect(list.remove()).toEqual(5);
|
||||
expect(list.length).toEqual(2);
|
||||
|
||||
list.add(11);
|
||||
expect(list.remove()).toEqual(7);
|
||||
expect(list.remove()).toEqual(9);
|
||||
expect(list.remove()).toEqual(11);
|
||||
expect(list.remove()).toEqual(undefined);
|
||||
expect(list.length).toEqual(0);
|
||||
|
||||
list.add(5);
|
||||
list.add(7);
|
||||
list.add(9);
|
||||
expect(list.length).toEqual(3);
|
||||
expect(list.removeAt(1)).toEqual(7);
|
||||
expect(list.capacity).toEqual(3);
|
||||
|
||||
list.add(11);
|
||||
list.add(13);
|
||||
expect(list.length).toEqual(5);
|
||||
expect(list.capacity).toEqual(6);
|
||||
});
|
||||
|
||||
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue