diff --git a/REQUIRE b/REQUIRE index 1199475..e0ee8c3 100644 --- a/REQUIRE +++ b/REQUIRE @@ -1,2 +1,2 @@ julia 0.6 -Compat 0.27.0 +Compat 0.33.0 diff --git a/src/MATLAB.jl b/src/MATLAB.jl index b0e7e3b..1778f65 100644 --- a/src/MATLAB.jl +++ b/src/MATLAB.jl @@ -2,6 +2,7 @@ __precompile__() module MATLAB +using Compat using Compat.Sys: islinux, iswindows, isapple import Base: eltype, close, size, copy, ndims, unsafe_convert diff --git a/src/mxarray.jl b/src/mxarray.jl index 95aa78c..f35822f 100644 --- a/src/mxarray.jl +++ b/src/mxarray.jl @@ -278,7 +278,7 @@ function mxarray(a::Array{T}) where T<:MxComplexNum end mxarray(a::BitArray) = mxarray(convert(Array{Bool}, a)) -mxarray(a::Range) = mxarray([a;]) +mxarray(a::AbstractRange) = mxarray([a;]) # sparse matrix diff --git a/test/engine.jl b/test/engine.jl index 16ff5b1..64dc754 100644 --- a/test/engine.jl +++ b/test/engine.jl @@ -1,5 +1,5 @@ using MATLAB -using Base.Test +using Compat.Test # test engine diff --git a/test/matfile.jl b/test/matfile.jl index 6c251db..6a4d421 100644 --- a/test/matfile.jl +++ b/test/matfile.jl @@ -1,5 +1,5 @@ using MATLAB -using Base.Test +using Compat.Test # test MMAT file I/O fn = "$(tempname()).mat" diff --git a/test/matstr.jl b/test/matstr.jl index 866c721..0a5fb4c 100644 --- a/test/matstr.jl +++ b/test/matstr.jl @@ -1,5 +1,5 @@ using MATLAB -using Base.Test +using Compat.Test @test mat"1" == 1 @test mat"[1, 2, 3]" == [1 2 3] diff --git a/test/mstatements.jl b/test/mstatements.jl index db12838..754b310 100644 --- a/test/mstatements.jl +++ b/test/mstatements.jl @@ -1,5 +1,5 @@ using MATLAB -using Base.Test +using Compat.Test @test mstatement(:abc) == "abc" diff --git a/test/mxarray.jl b/test/mxarray.jl index 9ac6c39..d5bc404 100644 --- a/test/mxarray.jl +++ b/test/mxarray.jl @@ -1,5 +1,5 @@ using MATLAB -using Base.Test +using Compat.Test # Unit testing for MxArray @@ -192,7 +192,7 @@ a_mx = mxarray(a) a2 = jsparse(a_mx) @test size(a2) == (8, 9) -@test countnz(a2) == countnz(a) +@test count(!iszero, a2) == count(!iszero, a) @test isequal(a2, a) delete(a_mx) @@ -205,7 +205,7 @@ a_mx = mxarray(a) a2 = jsparse(a_mx) @test size(a2) == (8, 9) -@test countnz(a2) == countnz(a) +@test count(!iszero, a2) == count(!iszero, a) @test isequal(a2, a) delete(a_mx) diff --git a/test/runtests.jl b/test/runtests.jl index b599d1c..c946d90 100644 --- a/test/runtests.jl +++ b/test/runtests.jl @@ -1,5 +1,5 @@ using MATLAB -using Base.Test +using Compat.Test include("engine.jl") include("matfile.jl")