@@ -59,22 +59,22 @@ describe('RBTree', function () {
59
59
expect ( tree . _root . _left ) . not . toBeNull ( ) ;
60
60
expect ( tree . _root . _left . isRed ( ) ) . toBeTruthy ( ) ;
61
61
tree . put ( 2 , 'baz' ) ;
62
- expect ( tree . _root . _right ) . not . toBeNull ( ) ;
63
- expect ( tree . _root . _right . isRed ( ) ) . toBeFalsy ( ) ;
62
+ expect ( tree . _root . getRight ( ) ) . not . toBeNull ( ) ;
63
+ expect ( tree . _root . getRight ( ) . isRed ( ) ) . toBeFalsy ( ) ;
64
64
65
65
tree = new RBTree ( ) ;
66
66
tree . put ( 1 , 'bar' ) ;
67
67
tree . put ( 2 , 'foo' ) ;
68
68
tree . put ( 3 , 'baz' ) ;
69
- expect ( tree . _root . _right ) . not . toBeNull ( ) ;
69
+ expect ( tree . _root . getRight ( ) ) . not . toBeNull ( ) ;
70
70
expect ( tree . _root . _left ) . not . toBeNull ( ) ;
71
71
expect ( tree . _root . isRed ( ) ) . toBeFalsy ( ) ;
72
- expect ( tree . _root . _right . isRed ( ) ) . toBeFalsy ( ) ;
72
+ expect ( tree . _root . getRight ( ) . isRed ( ) ) . toBeFalsy ( ) ;
73
73
expect ( tree . _root . _left . isRed ( ) ) . toBeFalsy ( ) ;
74
74
tree . put ( 4 , 'foobar' ) ;
75
75
tree . put ( 5 , 'foobar' ) ;
76
- expect ( tree . _root . _right . _right ) . not . toBeNull ( ) ;
77
- expect ( tree . _root . _right . _right . isRed ( ) ) . toBeFalsy ( ) ;
76
+ expect ( tree . _root . getRight ( ) . getRight ( ) ) . not . toBeNull ( ) ;
77
+ expect ( tree . _root . getRight ( ) . getRight ( ) . isRed ( ) ) . toBeFalsy ( ) ;
78
78
} ) ;
79
79
80
80
} ) ;