From 546b6e3c927233967cac17d91f44bd633a18e89a Mon Sep 17 00:00:00 2001 From: Tony Kelman Date: Tue, 31 May 2016 15:56:11 -0700 Subject: [PATCH] avoid looping through deprecations that are gone now (#217) * avoid looping through deprecations that are gone now should hopefully fix tests on 0.5 * Also remove msync It wasn't in Libc for very long, people shouldn't be relying on it. We can probably take it out of Compat.Libc later. --- test/runtests.jl | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/test/runtests.jl b/test/runtests.jl index d2960c8582d9c..55fc900c3e782 100644 --- a/test/runtests.jl +++ b/test/runtests.jl @@ -168,14 +168,14 @@ extrapath = @windows? joinpath(JULIA_HOME,"..","Git","usr","bin")*";" : "" end let convert_funcs_and_types = - ((integer, :Integer), (signed, :Signed), (unsigned, :Unsigned), - (int, :Int), (int8, :Int8), (int16, :Int16), (int32, :Int32), - (int64, :Int64), (int128, :Int128), (uint, :UInt), - (uint8, :UInt8), (uint16, :UInt16), (uint32, :UInt32), - (uint64, :UInt64), (uint128, :UInt128), - (float16, :Float16), (float32, :Float32), (float64, :Float64), - (complex32,:Complex32), (complex64,:Complex64),(complex128,:Complex128), - (char,:Char)) + ((:integer, :Integer), (:signed, :Signed), (:unsigned, :Unsigned), + (:int, :Int), (:int8, :Int8), (:int16, :Int16), (:int32, :Int32), + (:int64, :Int64), (:int128, :Int128), (:uint, :UInt), + (:uint8, :UInt8), (:uint16, :UInt16), (:uint32, :UInt32), + (:uint64, :UInt64), (:uint128, :UInt128), + (:float16, :Float16), (:float32, :Float32), (:float64, :Float64), + (:complex32,:Complex32), (:complex64,:Complex64),(:complex128,:Complex128), + (:char,:Char)) for (df,t) in convert_funcs_and_types x = @compat UInt8(10) @@ -187,14 +187,14 @@ let convert_funcs_and_types = @test typeof(r1) === ty end if VERSION < v"0.4.0-dev+3732" - r2 = df(x) + r2 = eval(df)(x) @test r1 === r2 if t === :Signed || t === :Complex32 continue end x = fill(x, 10) r1 = eval(:(@compat map($t, $x))) - r2 = df(x) + r2 = eval(df)(x) @test r1 == r2 @test typeof(r1) === typeof(r2) end @@ -253,7 +253,7 @@ end @test tryparse(Int64, "nonsense", 36) === Nullable{Int64}(@compat Int64(1856056985582)) # Make sure exports from Libc and Libdl are defined -for x in [:strftime,:systemsleep,:getpid,:FILE,:malloc,:flush_cstdio,:realloc,:strptime,:Libc,:errno,:msync,:TmStruct,:calloc,:time,:strerror,:gethostname,:free] +for x in [:strftime,:systemsleep,:getpid,:FILE,:malloc,:flush_cstdio,:realloc,:strptime,:Libc,:errno,:TmStruct,:calloc,:time,:strerror,:gethostname,:free] getfield(Libc, x) end for x in [:RTLD_LOCAL,:RTLD_GLOBAL,:find_library,:dlsym,:RTLD_LAZY,:RTLD_NODELETE,:DL_LOAD_PATH,:RTLD_NOW,:Libdl,:dlext,:dlsym_e,:RTLD_FIRST,:dlopen,:dllist,:dlpath,:RTLD_NOLOAD,:dlclose,:dlopen_e,:RTLD_DEEPBIND]