@@ -213,58 +213,60 @@ mktemp() do fname, f
213213 end
214214end
215215
216- types = [
217- Bool,
218- Float16,
219- Float32,
220- Float64,
221- Int128,
222- Int16,
223- Int32,
224- Int64,
225- Int8,
226- UInt16,
227- UInt32,
228- UInt64,
229- UInt8,
230- ]
231- for T in types
232- # julia#18510, Nullable constructors
233- x = @compat Nullable (one (T), true )
234- @test isnull (x) === false
235- @test isa (x. value, T)
236- @test eltype (x) === T
237-
238- x = @compat Nullable {T} (one (T), true )
239- y = @compat Nullable {Any} (one (T), true )
240- @test isnull (x) === false
241- @test isnull (y) === false
242- @test isa (x. value, T)
243- @test eltype (x) === T
244- @test eltype (y) === Any
245-
246- x = @compat Nullable {T} (one (T), false )
247- y = @compat Nullable {Any} (one (T), false )
248- @test isnull (x) === true
249- @test isnull (y) === true
250- @test eltype (x) === T
251- @test eltype (y) === Any
252-
253- x = @compat Nullable (one (T), false )
254- @test isnull (x) === true
255- @test eltype (x) === T
256-
257- x = @compat Nullable {T} ()
258- @test isnull (x) === true
259- @test eltype (x) === T
260-
261- # julia#18484, generic isnull, unsafe_get
262- a = one (T)
263- x = @compat Nullable (a, true )
264- @test isequal (unsafe_get (x), a)
265-
266- x = @compat Nullable {Array{T}} ()
267- @test_throws UndefRefError unsafe_get (x)
216+ if VERSION < v " 0.7.0-DEV.3017"
217+ types = [
218+ Bool,
219+ Float16,
220+ Float32,
221+ Float64,
222+ Int128,
223+ Int16,
224+ Int32,
225+ Int64,
226+ Int8,
227+ UInt16,
228+ UInt32,
229+ UInt64,
230+ UInt8,
231+ ]
232+ for T in types
233+ # julia#18510, Nullable constructors
234+ x = @compat Nullable (one (T), true )
235+ @test isnull (x) === false
236+ @test isa (x. value, T)
237+ @test eltype (x) === T
238+
239+ x = @compat Nullable {T} (one (T), true )
240+ y = @compat Nullable {Any} (one (T), true )
241+ @test isnull (x) === false
242+ @test isnull (y) === false
243+ @test isa (x. value, T)
244+ @test eltype (x) === T
245+ @test eltype (y) === Any
246+
247+ x = @compat Nullable {T} (one (T), false )
248+ y = @compat Nullable {Any} (one (T), false )
249+ @test isnull (x) === true
250+ @test isnull (y) === true
251+ @test eltype (x) === T
252+ @test eltype (y) === Any
253+
254+ x = @compat Nullable (one (T), false )
255+ @test isnull (x) === true
256+ @test eltype (x) === T
257+
258+ x = @compat Nullable {T} ()
259+ @test isnull (x) === true
260+ @test eltype (x) === T
261+
262+ # julia#18484, generic isnull, unsafe_get
263+ a = one (T)
264+ x = @compat Nullable (a, true )
265+ @test isequal (unsafe_get (x), a)
266+
267+ x = @compat Nullable {Array{T}} ()
268+ @test_throws UndefRefError unsafe_get (x)
269+ end
268270end
269271
270272@test xor (1 ,5 ) == 4
@@ -902,6 +904,34 @@ module Test24459
902904 @test isdefined (@__MODULE__ , :Dates )
903905end
904906
907+ # 0.7
908+ module Test25056
909+ using Compat
910+ using Compat. Test
911+ using Compat. Printf
912+ @test isdefined (@__MODULE__ , :Printf )
913+ @test isdefined (@__MODULE__ , Symbol (" @printf" ))
914+ @test isdefined (@__MODULE__ , Symbol (" @sprintf" ))
915+ end
916+
917+ # 0.7
918+ module Test24714
919+ using Compat
920+ using Compat. Test
921+ using Compat. IterativeEigensolvers
922+ @test isdefined (@__MODULE__ , :IterativeEigensolvers )
923+ @test isdefined (@__MODULE__ , :eigs )
924+ @test isdefined (@__MODULE__ , :svds )
925+ end
926+
927+ # 0.7
928+ module Test24648
929+ using Compat
930+ using Compat. Test
931+ using Compat. SuiteSparse
932+ @test isdefined (@__MODULE__ , :SuiteSparse )
933+ end
934+
905935let a = [0 ,1 ,2 ,3 ,0 ,1 ,2 ,3 ]
906936 @test findfirst (equalto (3 ), [1 ,2 ,4 ,1 ,2 ,3 ,4 ]) == 6
907937 @test findfirst (! equalto (1 ), [1 ,2 ,4 ,1 ,2 ,3 ,4 ]) == 2
@@ -997,6 +1027,30 @@ module Test25021
9971027 @test titlecase (" firstname lastname" ) == " Firstname Lastname"
9981028end
9991029
1030+ # 0.7.0-DEV.2951
1031+ @test AbstractDict === (isdefined (Base, :AbstractDict ) ? Base. AbstractDict : Base. Associative)
1032+
1033+ # 0.7.0-DEV.2978
1034+ @test axes === (isdefined (Base, :axes ) ? Base. axes : Base. indices)
1035+ @test axes (1 ) == ()
1036+ @test axes (1 ,1 ) == 1 : 1
1037+
1038+ # 0.7.0-DEV.3137
1039+ @test Nothing === (isdefined (Base, :Nothing ) ? Base. Nothing : Base. Void)
1040+ @test Nothing === Cvoid
1041+
1042+ # 0.7.0-DEV.3017
1043+ @test isa (Some (1 ), Some{Int})
1044+ @test convert (Some{Float64}, Some (1 )) == Some (1.0 )
1045+ @test convert (Void, nothing ) == nothing
1046+ @test_throws MethodError convert (Void, 1 )
1047+ @test Some (nothing ) != nothing
1048+ @test coalesce (Some (1 )) == 1
1049+ @test coalesce (nothing ) == nothing
1050+ @test coalesce (nothing , Some (1 ), Some (2 )) == 1
1051+ @test Compat. notnothing (1 ) == 1
1052+ @test_throws ArgumentError Compat. notnothing (nothing )
1053+
10001054if VERSION < v " 0.6.0"
10011055 include (" deprecated.jl" )
10021056end
0 commit comments