@@ -998,27 +998,23 @@ func TestAddKeysWithEmptyValues(t *testing.T) {
998998 // check with empty array
999999 root , err := tree .Root ()
10001000 c .Assert (err , qt .IsNil )
1001- verif , err : = CheckProof (tree .hashFunction , keys [9 ], []byte {}, root , siblings )
1001+ err = CheckProof (tree .hashFunction , keys [9 ], []byte {}, root , siblings )
10021002 c .Assert (err , qt .IsNil )
1003- c .Check (verif , qt .IsTrue )
10041003
10051004 // check with array with only 1 zero
1006- verif , err = CheckProof (tree .hashFunction , keys [9 ], []byte {0 }, root , siblings )
1005+ err = CheckProof (tree .hashFunction , keys [9 ], []byte {0 }, root , siblings )
10071006 c .Assert (err , qt .IsNil )
1008- c .Check (verif , qt .IsTrue )
10091007
10101008 // check with array with 32 zeroes
10111009 e32 := []byte {
10121010 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 ,
10131011 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 ,
10141012 }
10151013 c .Assert (len (e32 ), qt .Equals , 32 )
1016- verif , err = CheckProof (tree .hashFunction , keys [9 ], e32 , root , siblings )
1014+ err = CheckProof (tree .hashFunction , keys [9 ], e32 , root , siblings )
10171015 c .Assert (err , qt .IsNil )
1018- c .Check (verif , qt .IsTrue )
10191016
10201017 // check with array with value!=0 returns false at verification
1021- verif , err = CheckProof (tree .hashFunction , keys [9 ], []byte {0 , 1 }, root , siblings )
1022- c .Assert (err , qt .IsNil )
1023- c .Check (verif , qt .IsFalse )
1018+ err = CheckProof (tree .hashFunction , keys [9 ], []byte {0 , 1 }, root , siblings )
1019+ c .Assert (err , qt .ErrorMatches , "calculated vs expected root mismatch" )
10241020}
0 commit comments