Skip to content

Commit

Permalink
fix some tests
Browse files Browse the repository at this point in the history
  • Loading branch information
fredrikekre committed Jan 10, 2018
1 parent 3c5b159 commit 73f3a1d
Showing 1 changed file with 1 addition and 45 deletions.
46 changes: 1 addition & 45 deletions test/runtests.jl
Original file line number Diff line number Diff line change
Expand Up @@ -370,33 +370,6 @@ for x in (3.1, -17, 3//4, big(111.1), Inf)
@test minmax(x) == (x, x)
end

# julia#20006
abstract type AbstractFoo20006 end
eval(Expr(
struct_sym, false,
Expr(:(<:), :(ConcreteFoo20006{T<:Int}), :AbstractFoo20006),
quote end))
eval(Expr(
struct_sym, false,
Expr(:(<:), :(ConcreteFoo20006N{T<:Int,N}), :AbstractFoo20006),
quote end))
ConcreteFoo200061{T<:Int} = ConcreteFoo20006N{T,1}
@test Compat.TypeUtils.isabstract(AbstractFoo20006)
@test !Compat.TypeUtils.isabstract(ConcreteFoo20006)
@test !Compat.TypeUtils.isabstract(ConcreteFoo20006N)
@test !Compat.TypeUtils.isabstract(ConcreteFoo200061)
@test !Compat.TypeUtils.isabstract(StridedArray)
@test Compat.TypeUtils.parameter_upper_bound(ConcreteFoo20006, 1) == Int
@test isa(Compat.TypeUtils.typename(Array), TypeName)

# PR #20418
abstract type Abstract20418{T} <: Ref{T} end
@test Compat.TypeUtils.isabstract(Abstract20418)
primitive type Primitive20418{T} <: Ref{T} 16 end
@test !Compat.TypeUtils.isabstract(Primitive20418)
@test isbits(Primitive20418{Int})
@test sizeof(Primitive20418{Int}) == 2

# julia #18839
module Test18839

Expand Down Expand Up @@ -493,23 +466,6 @@ let zbuf = IOBuffer([0xbf, 0xc0, 0x00, 0x00, 0x40, 0x20, 0x00, 0x00,
@test bswap(z2) === 3.5 - 4.5im
end

# PR 19449
using Compat: StringVector
@test length(StringVector(5)) == 5
@test String(fill!(StringVector(5), 0x61)) == "aaaaa"

# collect
if VERSION < v"0.7.0-"
# Note: This is disabled on 0.7, since the Compat.collect functionality is only
# applicable on 0.5, and OffsetArrays currently has some incompatibilities with
# 0.7. This can be reenabled later if needed.
using OffsetArrays
a = OffsetArray(1:3, -1:1)
b = Compat.collect(a)
@test indices(b) === (Base.OneTo(3),)
@test b == [1,2,3]
end

# PR 22064
module Test22064
using Compat
Expand Down Expand Up @@ -612,7 +568,7 @@ eval(Expr(struct_sym, false, :TestType, Expr(:block, :(a::Int), :b)))
# PR 22761
@test_throws OverflowError throw(OverflowError("overflow"))

let x = fill!(StringVector(5), 0x61)
let x = fill!(Base.StringVector(5), 0x61)
# 0.7
@test pointer(x) == pointer(String(x))
end
Expand Down

0 comments on commit 73f3a1d

Please sign in to comment.