# Write test cases for printing Single Linked List and Double Linked List ?

kurtz182 Profile Answers by kurtz182 Questions by kurtz182

• Member Since Nov-2009 | Dec 31st, 2009

Preconditions:
Node A points to node C ; [NODE A]---->[NODE C]
Node B is an insertion node;  Insert [NODE B]

Test cases:

TC1) You can insert [NODE B] after [NODE A]
TC2) You can not insert [NODE B] before [NODE A]
TC3) [NODE A] points to [NODE B] after insertion
TC4) [NODE B] points to [NODE C] after insertion
TC5) You can remove [NODE B]
TC6) [NODE A] points to [NODE C] after removal

Preconditions:
Nodes A and C point to one another; [NODE A]<---->[NODE C]
Node B is an insertion node;   Insert [NODE B]

Test cases:

TC1) You can insert [NODE B] after [NODE A]
TC2) You can insert [NODE B] before [NODE A]
TC3) [NODE A] and [NODE B] point to one another after insertion
TC4) [NODE B] and [NODE C] point to one another after insertion
TC5) You can remove [NODE B]
TC6) [NODE A] and [NODE C] point to one another after removal

#### kurtz182 Profile Answers by kurtz182 Questions by kurtz182

• Dec 31st, 2009

Preconditions:
Node A points to node C ; [NODE A]---->[NODE C]
Node B is an insertion node;  Insert [NODE B]

Test cases:

TC1) You can insert [NODE B] after [NODE A]
TC2) You can not insert [NODE B] before [NODE A]
TC3) [NODE A] points to [NODE B] after insertion
TC4) [NODE B] points to [NODE C] after insertion
TC5) You can remove [NODE B]
TC6) [NODE A] points to [NODE C] after removal

Preconditions:
Nodes A and C point to one another; [NODE A]<---->[NODE C]
Node B is an insertion node;   Insert [NODE B]

Test cases:

TC1) You can insert [NODE B] after [NODE A]
TC2) You can insert [NODE B] before [NODE A]
TC3) [NODE A] and [NODE B] point to one another after insertion
TC4) [NODE B] and [NODE C] point to one another after insertion
TC5) You can remove [NODE B]
TC6) [NODE A] and [NODE C] point to one another after removal  