Skip to content

Commit 00256ff

Browse files
authored
Merge pull request #8 from yuyichao/0.6
Fix depwarns on julia 0.6 & FixedPointNumbers 0.3
2 parents dc72f52 + 5845dff commit 00256ff

File tree

4 files changed

+13
-11
lines changed

4 files changed

+13
-11
lines changed

REQUIRE

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
1-
julia 0.5-
1+
julia 0.5
2+
Compat 0.17.0

src/MappedArrays.jl

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,11 @@ __precompile__()
33
module MappedArrays
44

55
using Base: @propagate_inbounds
6+
using Compat
67

78
export AbstractMappedArray, MappedArray, ReadonlyMappedArray, mappedarray, of_eltype
89

9-
abstract AbstractMappedArray{T,N} <: AbstractArray{T,N}
10+
@compat abstract type AbstractMappedArray{T,N} <: AbstractArray{T,N} end
1011

1112
immutable ReadonlyMappedArray{T,N,A<:AbstractArray,F} <: AbstractMappedArray{T,N}
1213
f::F

test/REQUIRE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
FixedPointNumbers
1+
FixedPointNumbers 0.3.0
22
OffsetArrays

test/runtests.jl

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -38,20 +38,20 @@ sb = similar(b)
3838
@test size(sb) == size(b)
3939

4040
a = [0x01 0x03; 0x02 0x04]
41-
b = mappedarray((y->UFixed8(y,0),x->x.i), a)
41+
b = mappedarray((y->N0f8(y,0),x->x.i), a)
4242
for i = 1:4
43-
@test b[i] == UFixed8(i/255)
43+
@test b[i] == N0f8(i/255)
4444
end
4545
b[2,1] = 10/255
4646
@test a[2,1] == 0x0a
4747

4848
a = [0.1 0.3; 0.2 0.4]
49-
b = @inferred(of_eltype(UFixed8, a))
50-
@test b[1,1] === UFixed8(0.1)
51-
b = @inferred(of_eltype(zero(UFixed8), a))
52-
@test b[1,1] === UFixed8(0.1)
53-
b[2,1] = UFixed8(0.5)
54-
@test a[2,1] == UFixed8(0.5)
49+
b = @inferred(of_eltype(N0f8, a))
50+
@test b[1,1] === N0f8(0.1)
51+
b = @inferred(of_eltype(zero(N0f8), a))
52+
@test b[1,1] === N0f8(0.1)
53+
b[2,1] = N0f8(0.5)
54+
@test a[2,1] == N0f8(0.5)
5555
@test !(b === a)
5656
b = @inferred(of_eltype(Float64, a))
5757
@test b === a

0 commit comments

Comments
 (0)