Skip to content

Commit 208a012

Browse files
shannonzhufacebook-github-bot
authored andcommitted
Reuse helper function for location insensitive source compare
Summary: easy noop Reviewed By: dkgi Differential Revision: D30172486 fbshipit-source-id: 3bae8dad9307bc3b63626fa0106730b14ba1e8a9
1 parent ad4d845 commit 208a012

File tree

1 file changed

+1
-6
lines changed

1 file changed

+1
-6
lines changed

source/test/test.ml

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -245,12 +245,7 @@ let assert_source_equal ?(location_insensitive = false) left right =
245245
let right = { right with Source.metadata } in
246246
let cmp =
247247
if location_insensitive then
248-
fun left right ->
249-
Source.equal { left with statements = [] } { right with statements = [] }
250-
&& List.equal
251-
(fun left right -> Statement.location_insensitive_compare left right = 0)
252-
left.statements
253-
right.statements
248+
fun left right -> Source.location_insensitive_compare left right = 0
254249
else
255250
Source.equal
256251
in

0 commit comments

Comments
 (0)