@@ -605,7 +605,7 @@ function testBTree(maxNodeSize: number)
605
605
606
606
function expectDiffCorrect ( treeThis : BTree < number , number > , treeOther : BTree < number , number > ) : void {
607
607
reset ( ) ;
608
- treeThis . diff ( treeOther , OnlyThis , OnlyOther , Different ) ;
608
+ treeThis . diffAgainst ( treeOther , OnlyThis , OnlyOther , Different ) ;
609
609
let onlyThisT : Map < number , number > = new Map ( ) ;
610
610
let onlyOtherT : Map < number , number > = new Map ( ) ;
611
611
let differentT : Map < number , string > = new Map ( ) ;
@@ -631,7 +631,7 @@ function testBTree(maxNodeSize: number)
631
631
test ( `Diff of trees with different comparators is an error` , ( ) => {
632
632
const treeA = new BTree < number , number > ( [ ] , compare ) ;
633
633
const treeB = new BTree < number , number > ( [ ] , ( a , b ) => b - a ) ;
634
- expect ( ( ) => treeA . diff ( treeB , OnlyThis , OnlyOther , Different ) ) . toThrow ( 'comparators' ) ;
634
+ expect ( ( ) => treeA . diffAgainst ( treeB , OnlyThis , OnlyOther , Different ) ) . toThrow ( 'comparators' ) ;
635
635
} ) ;
636
636
637
637
const entriesGroup : [ number , number ] [ ] [ ] = [ [ ] , [ [ 1 , 1 ] , [ 2 , 2 ] , [ 3 , 3 ] , [ 4 , 4 ] , [ 5 , 5 ] ] ] ;
@@ -691,7 +691,7 @@ function testBTree(maxNodeSize: number)
691
691
const modifiedInB1 = 3 , modifiedInB2 = maxKey - 2 ;
692
692
treeB . set ( modifiedInB1 , differingValue ) ;
693
693
treeB . set ( modifiedInB2 , differingValue )
694
- treeA . diff ( treeB , OnlyThis , OnlyOther , Different ) ;
694
+ treeA . diffAgainst ( treeB , OnlyThis , OnlyOther , Different ) ;
695
695
expectDiffCorrect ( treeA , treeB ) ;
696
696
}
697
697
@@ -723,19 +723,19 @@ function testBTree(maxNodeSize: number)
723
723
tree2 . set ( 110 , - 1 ) ;
724
724
const ReturnKey = ( key : number ) => { return { break : key } ; } ;
725
725
726
- let val = tree . diff ( tree2 , OnlyThis , OnlyOther , ReturnKey ) ;
726
+ let val = tree . diffAgainst ( tree2 , OnlyThis , OnlyOther , ReturnKey ) ;
727
727
expect ( onlyOther . size ) . toEqual ( 1 ) ;
728
728
expect ( onlyThis . size ) . toEqual ( 0 ) ;
729
729
expect ( val ) . toEqual ( 20 ) ;
730
730
reset ( ) ;
731
731
732
- val = tree . diff ( tree2 , OnlyThis , ReturnKey , Different ) ;
732
+ val = tree . diffAgainst ( tree2 , OnlyThis , ReturnKey , Different ) ;
733
733
expect ( different . size ) . toEqual ( 0 ) ;
734
734
expect ( onlyThis . size ) . toEqual ( 0 ) ;
735
735
expect ( val ) . toEqual ( 110 ) ;
736
736
reset ( ) ;
737
737
738
- val = tree . diff ( tree2 , ReturnKey , OnlyOther , Different ) ;
738
+ val = tree . diffAgainst ( tree2 , ReturnKey , OnlyOther , Different ) ;
739
739
expect ( different . size ) . toEqual ( 1 ) ;
740
740
expect ( onlyOther . size ) . toEqual ( 1 ) ;
741
741
expect ( val ) . toEqual ( 10 ) ;
0 commit comments