d, λ = edit_distance(triangle, quadrangle, subst_cost=MinkowskiCost(1:3,1:4))
@test d == 1.0
@test λ == Tuple[(1,1),(2,2),(3,3),(0,4)]

d, λ = edit_distance(quadrangle, triangle, subst_cost=MinkowskiCost(1:4,1:3))
@test d == 1.0
@test λ == Tuple[(1,1),(2,2),(3,3),(4,0)]

d, λ = edit_distance(triangle, pentagon, subst_cost=MinkowskiCost(1:3,1:5))
@test d == 2.0
@test λ == Tuple[(1,1),(2,2),(3,3),(0,4),(0,5)]

d, λ = edit_distance(pentagon, triangle, subst_cost=MinkowskiCost(1:5,1:3))
@test d == 2.0
@test λ == Tuple[(1,1),(2,2),(3,3),(4,0),(5,0)]

cost = MinkowskiCost(1:3,1:3)
bcost = BoundedMinkowskiCost(1:3,1:3)
for i=1:3
  @test cost(i,i) == 0.
  @test bcost(i,i) == 2/3
end
