Skip to content

Commit

Permalink
exercise fallback addition of ranges
Browse files Browse the repository at this point in the history
  • Loading branch information
mschauer committed May 11, 2015
1 parent 13d6a8e commit 616c831
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions test/ranges.jl
Original file line number Diff line number Diff line change
Expand Up @@ -244,6 +244,10 @@ end
@test all(([1:5;] - (1:5)) .== 0)
@test all(((1:5) - [1:5;]) .== 0)

# exercise fallback addition of ranges
@test ((linspace(1.,5.,5) - linspace(1.,5.,5)) == zeros(5))
@test_throws DimensionMismatch (linspace(1.,5.,5) - linspace(1.,5.,6))

# tricky floating-point ranges

@test [0.1:0.1:0.3;] == [linspace(0.1,0.3,3);] == [1:3;]./10
Expand Down

0 comments on commit 616c831

Please sign in to comment.