Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // testing find
- void testFind(Tester t) {
- this.initDeque();
- t.checkExpect(deque2.find(new StrLengthOver3), sentinel1);
- t.checkExpect(deque2.find(new StrLengthOver2), node1);
- t.checkExpect(deque3.find(new StrLengthOver3), node5);
- }
- // testing findSentHelp
- void testFindSentHelp(Tester t) {
- this.initDeque();
- t.checkExpect(sentinel1.findSentHelp(new StrLengthOver3), sentinel1);
- t.checkExpect(sentinel1.findSentHelp(new StrLengthOver2), node1);
- t.checkExpect(sentinel2.findSentHelp(new StrLengthOver3), node5);
- }
- // testing findHelp
- void testFindHelp(Tester t) {
- this.initDeque();
- t.checkExpect(sentinel1.findHelp(new StrLengthOver3), sentinel1);
- t.checkExpect(node1.findHelp(new StrLengthOver3), sentinel1);
- t.checkExpect(node1.findHelp(new StrLengthOver2), node1);
- t.checkExpect(node3.findHelp(new StrLengthOver3), sentinel1);
- t.checkExpect(node3.findHelp(new StrLengthOver2), node3);
- }
- // testing apply
- void testApply(Tester t) {
- t.checkExpect(new StrLengthOver3.apply("kitty"), true);
- t.checkExpect(new StrLengthOver3.apply("cat"), false);
- t.checkExpect(new StrLengthOver2.apply("cat"), true);
- t.checkExpect(new StrLengthOver2.apply("h"), false);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement