diff --git a/base/deprecated.jl b/base/deprecated.jl index c1bc89a844e40..1df19712e226d 100644 --- a/base/deprecated.jl +++ b/base/deprecated.jl @@ -145,9 +145,6 @@ end @deprecate chol(A::Number, ::Type{Val{:L}}) ctranspose(chol(A)) @deprecate chol(A::AbstractMatrix, ::Type{Val{:L}}) ctranspose(chol(A)) -@deprecate cummin(A, dim=1) accumulate(min, A, dim=1) -@deprecate cummax(A, dim=1) accumulate(max, A, dim=1) - # Number updates @@ -1133,4 +1130,8 @@ eval(Base.Dates, quote recur{T<:TimeType}(fun::Function, start::T, stop::T; step::Period=Day(1), negate::Bool=false, limit::Int=10000) = recur(fun, start:step:stop; negate=negate) end) +# #18931 +@deprecate cummin(A, dim=1) accumulate(min, A, dim=1) +@deprecate cummax(A, dim=1) accumulate(max, A, dim=1) + # End deprecations scheduled for 0.6 diff --git a/test/Makefile b/test/Makefile index 12569ea960267..f67f61ff5bc59 100644 --- a/test/Makefile +++ b/test/Makefile @@ -12,12 +12,12 @@ default: all ifeq ($(OS),WINNT) ULIMIT_TEST= else -ULIMIT_TEST=ulimit -n 128 +ULIMIT_TEST=ulimit -n 128 && endif $(TESTS): @cd $(SRCDIR) && \ - $(ULIMIT_TEST) && \ + $(ULIMIT_TEST) \ $(call PRINT_JULIA, $(call spawn,$(JULIA_EXECUTABLE)) --check-bounds=yes --startup-file=no ./runtests.jl $@) perf: diff --git a/test/file.jl b/test/file.jl index ce9a885ddbd01..09ac01696d29d 100644 --- a/test/file.jl +++ b/test/file.jl @@ -108,12 +108,12 @@ if is_windows() else @test filesize(dir) > 0 end -now = time() +nowtime = time() # Allow 10s skew in addition to the time it took us to actually execute this code -let skew = 10 + (now - starttime) +let skew = 10 + (nowtime - starttime) mfile = mtime(file) mdir = mtime(dir) - @test abs(now - mfile) <= skew && abs(now - mdir) <= skew && abs(mfile - mdir) <= skew + @test abs(nowtime - mfile) <= skew && abs(nowtime - mdir) <= skew && abs(mfile - mdir) <= skew end #@test Int(time()) >= Int(mtime(file)) >= Int(mtime(dir)) >= 0 # 1 second accuracy should be sufficient diff --git a/test/libgit2.jl b/test/libgit2.jl index b38e88d5069a2..86dbe346e3709 100644 --- a/test/libgit2.jl +++ b/test/libgit2.jl @@ -95,29 +95,29 @@ end # SSH URL using scp-like syntax m = match(LibGit2.URL_REGEX, "user@server:project.git") - @test m[:scheme] == nothing + @test m[:scheme] === nothing @test m[:user] == "user" - @test m[:password] == nothing + @test m[:password] === nothing @test m[:host] == "server" - @test m[:port] == nothing + @test m[:port] === nothing @test m[:path] == "project.git" # Realistic example from GitHub using HTTPS m = match(LibGit2.URL_REGEX, "https://github.com/JuliaLang/Example.jl.git") @test m[:scheme] == "https" - @test m[:user] == nothing - @test m[:password] == nothing + @test m[:user] === nothing + @test m[:password] === nothing @test m[:host] == "github.com" - @test m[:port] == nothing + @test m[:port] === nothing @test m[:path] == "/JuliaLang/Example.jl.git" # Realistic example from GitHub using SSH m = match(LibGit2.URL_REGEX, "git@github.com:JuliaLang/Example.jl.git") - @test m[:scheme] == nothing + @test m[:scheme] === nothing @test m[:user] == "git" - @test m[:password] == nothing + @test m[:password] === nothing @test m[:host] == "github.com" - @test m[:port] == nothing + @test m[:port] === nothing @test m[:path] == "JuliaLang/Example.jl.git" # Make sure usernames can contain special characters diff --git a/test/parallel_exec.jl b/test/parallel_exec.jl index e7c22f5d58fd8..6635edca681b3 100644 --- a/test/parallel_exec.jl +++ b/test/parallel_exec.jl @@ -1131,7 +1131,7 @@ function test_blas_config(pid, expected) end function test_add_procs_threaded_blas() - if get_num_threads() == nothing + if get_num_threads() === nothing warn("Skipping blas num threads tests due to unsupported blas version") return end diff --git a/test/reflection.jl b/test/reflection.jl index 28ddb97d2f063..56ff6625899af 100644 --- a/test/reflection.jl +++ b/test/reflection.jl @@ -588,11 +588,11 @@ end let f18888() = return nothing m = first(methods(f18888, Tuple{})) - @test m.specializations == nothing + @test m.specializations === nothing ft = typeof(f18888) code_typed(f18888, Tuple{}; optimize=false) - @test m.specializations != nothing # uncached, but creates the specializations entry + @test m.specializations !== nothing # uncached, but creates the specializations entry code = Core.Inference.code_for_method(m, Tuple{ft}, Core.svec(), true) @test !isdefined(code, :inferred) diff --git a/test/test.jl b/test/test.jl index 240c5e264078d..ec62e69f71698 100644 --- a/test/test.jl +++ b/test/test.jl @@ -105,69 +105,69 @@ end end @testset "accounting" begin local ts - try ts = @testset "outer" begin - @testset "inner1" begin - @test true - @test false - @test 1 == 1 - @test 2 == :foo - @test 3 == 3 - @testset "d" begin - @test 4 == 4 - end - @testset begin - @test :blank != :notblank + try + ts = @testset "outer" begin + @testset "inner1" begin + @test true + @test false + @test 1 == 1 + @test 2 == :foo + @test 3 == 3 + @testset "d" begin + @test 4 == 4 + end + @testset begin + @test :blank != :notblank + end end - end - @testset "inner1" begin - @test 1 == 1 - @test 2 == 2 - @test 3 == :bar - @test 4 == 4 - @test_throws ErrorException 1+1 - @test_throws ErrorException error() - @test_throws RemoteException error() - @testset "errrrr" begin - @test "not bool" - @test error() + @testset "inner1" begin + @test 1 == 1 + @test 2 == 2 + @test 3 == :bar + @test 4 == 4 + @test_throws ErrorException 1+1 + @test_throws ErrorException error() + @test_throws RemoteException error() + @testset "errrrr" begin + @test "not bool" + @test error() + end + + error("exceptions in testsets should be caught") + @test 1 == 1 # this test will not be run end - error("exceptions in testsets should be caught") - @test 1 == 1 # this test will not be run - end - - @testset "loop with desc" begin - @testset "loop1 $T" for T in (Float32, Float64) - @test 1 == T(1) - end - end - @testset "loops without desc" begin - @testset for T in (Float32, Float64) - @test 1 == T(1) + @testset "loop with desc" begin + @testset "loop1 $T" for T in (Float32, Float64) + @test 1 == T(1) + end end - @testset for T in (Float32, Float64), S in (Int32,Int64) - @test S(1) == T(1) + @testset "loops without desc" begin + @testset for T in (Float32, Float64) + @test 1 == T(1) + end + @testset for T in (Float32, Float64), S in (Int32,Int64) + @test S(1) == T(1) + end end - end - srand(123) - @testset "some loops fail" begin - @testset for i in 1:5 - @test i <= rand(1:10) - end - # should add 3 errors and 3 passing tests - @testset for i in 1:6 - iseven(i) || error("error outside of test") - @test true # only gets run if the above passed + srand(123) + @testset "some loops fail" begin + @testset for i in 1:5 + @test i <= rand(1:10) + end + # should add 3 errors and 3 passing tests + @testset for i in 1:6 + iseven(i) || error("error outside of test") + @test true # only gets run if the above passed + end end end - end - # These lines shouldn't be called - redirect_stdout(OLD_STDOUT) - error("No exception was thrown!") + # These lines shouldn't be called + error("No exception was thrown!") catch ex - #redirect_stdout(OLD_STDOUT) - #redirect_stderr(OLD_STDERR) - #@show ex + redirect_stdout(OLD_STDOUT) + redirect_stderr(OLD_STDERR) + ex end @testset "ts results" begin @test isa(ts, Test.DefaultTestSet)