Skip to content

Commit 4bb6186

Browse files
committed
Fix print test
1 parent 6cb17ad commit 4bb6186

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

test/Utilities/copy.jl

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,11 @@ end
2222
map = MOIU.IndexMap(Dict(x => y), Dict(cx => cy))
2323
@test length(map) == 2
2424
# `x=>y` in Julia <= 1.1 and `x => y` in Julia >= 1.2
25-
x_y = string(Dict(x => y))[6:end-1]
25+
if VERSION < v"1.2"
26+
x_y = string(x) * "=>" * string(y)
27+
else
28+
x_y = string(x => y)
29+
end
2630
compare_without_moi(sprint(show, map), "Utilities.IndexMap($x_y,Pair{ConstraintIndex,ConstraintIndex}($cx, $cy))")
2731
end
2832

0 commit comments

Comments
 (0)