Skip to content

Commit

Permalink
Fix flapping test under const strings
Browse files Browse the repository at this point in the history
This old test assumed two strings created equal would not compare ==.
Turns out this is no longer the case with constant strings.
  • Loading branch information
rixed committed Feb 17, 2020
1 parent 7f7520e commit d6383df
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/batSet.ml
Original file line number Diff line number Diff line change
Expand Up @@ -885,7 +885,7 @@ let find x s = Concrete.find Pervasives.compare x s
let x = "abc" in (find "abc" (singleton x)) == x
let x = (1,1) in (find (1,1) (singleton x)) == x
let x,y = (1,1),(1,1) in find x (singleton y) == y
let x,y = "a","a" in find x (singleton y) != x
let x,y = [|0|],[|0|] in find x (singleton y) != x
try ignore (find (1,2) (singleton (1,1))); false with Not_found -> true
*)

Expand Down

0 comments on commit d6383df

Please sign in to comment.