Skip to content

Commit

Permalink
add additional tests for scalars and floats
Browse files Browse the repository at this point in the history
  • Loading branch information
simonbyrne committed Jul 24, 2013
1 parent dccba38 commit dba7023
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions test/iostring.jl
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,17 @@ a = Array(Uint8, 2)
@assert seek(io,0)
@assert read(io,Int16,6) == Int16[1,2,3,4,5,6]
@assert truncate(io,0)
@assert write(io,Int16[1,2,3,4,5,6],NetworkByteOrder) == 12
@assert write(io,int16(1),NetworkByteOrder) == 2
@assert write(io,Int16[2,3,4,5,6],NetworkByteOrder) == 10
@assert seek(io,0)
@assert read(io,Int16,NetworkByteOrder,6) == Int16[1,2,3,4,5,6]
@assert read(io,Int16,NetworkByteOrder,5) == Int16[1,2,3,4,5]
@assert read(io,Int16,NetworkByteOrder) == 6
@assert truncate(io,0)
@assert write(io,float64(1),NetworkByteOrder) == 8
@assert write(io,Float64[2,3,4,5,6],NetworkByteOrder) == 40
@assert seek(io,0)
@assert read(io,Float64,NetworkByteOrder,5) == Float64[1,2,3,4,5]
@assert read(io,Float64,NetworkByteOrder) == float64(6)
@assert seek(io,2)
@assert truncate(io, 10)
@assert ioslength(io) == 10
Expand Down

0 comments on commit dba7023

Please sign in to comment.