Skip to content

Commit 77a5e3b

Browse files
authored
Merge pull request #36 from JuliaMath/teh/versions
Broaden tested versions
2 parents b981da8 + 4225a44 commit 77a5e3b

File tree

4 files changed

+32
-16
lines changed

4 files changed

+32
-16
lines changed

.travis.yml

+2
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@ os:
55
- osx
66
julia:
77
- 0.6
8+
- 0.7
9+
- 1.0
810
- nightly
911
notifications:
1012
email: false

appveyor.yml

+25-16
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,19 @@
11
environment:
22
matrix:
3-
- JULIA_URL: "https://julialang-s3.julialang.org/bin/winnt/x86/0.6/julia-0.6-latest-win32.exe"
4-
- JULIA_URL: "https://julialang-s3.julialang.org/bin/winnt/x64/0.6/julia-0.6-latest-win64.exe"
5-
- JULIA_URL: "https://julialangnightlies-s3.julialang.org/bin/winnt/x86/julia-latest-win32.exe"
6-
- JULIA_URL: "https://julialangnightlies-s3.julialang.org/bin/winnt/x64/julia-latest-win64.exe"
3+
- julia_version: 0.6
4+
- julia_version: 0.7
5+
- julia_version: 1
6+
- julia_version: nightly
7+
8+
platform:
9+
- x86 # 32-bit
10+
- x64 # 64-bit
11+
12+
# # Uncomment the following lines to allow failures on nightly julia
13+
# # (tests will run but not make your overall status red)
14+
# matrix:
15+
# allow_failures:
16+
# - julia_version: nightly
717

818
branches:
919
only:
@@ -17,19 +27,18 @@ notifications:
1727
on_build_status_changed: false
1828

1929
install:
20-
- ps: "[System.Net.ServicePointManager]::SecurityProtocol = [System.Net.SecurityProtocolType]::Tls12"
21-
# Download most recent Julia Windows binary
22-
- ps: (new-object net.webclient).DownloadFile(
23-
$env:JULIA_URL,
24-
"C:\projects\julia-binary.exe")
25-
# Run installer silently, output to C:\projects\julia
26-
- C:\projects\julia-binary.exe /S /D=C:\projects\julia
30+
- ps: iex ((new-object net.webclient).DownloadString("https://raw.githubusercontent.com/JuliaCI/Appveyor.jl/version-1/bin/install.ps1"))
2731

2832
build_script:
29-
# Need to convert from shallow to complete for Pkg.clone to work
30-
- IF EXIST .git\shallow (git fetch --unshallow)
31-
- C:\projects\julia\bin\julia -e "versioninfo();
32-
Pkg.clone(pwd(), \"IntervalSets\"); Pkg.build(\"IntervalSets\")"
33+
- echo "%JL_BUILD_SCRIPT%"
34+
- C:\julia\bin\julia -e "%JL_BUILD_SCRIPT%"
3335

3436
test_script:
35-
- C:\projects\julia\bin\julia -e "Pkg.test(\"IntervalSets\")"
37+
- echo "%JL_TEST_SCRIPT%"
38+
- C:\julia\bin\julia -e "%JL_TEST_SCRIPT%"
39+
40+
# # Uncomment to support code coverage upload. Should only be enabled for packages
41+
# # which would have coverage gaps without running on Windows
42+
# on_success:
43+
# - echo "%JL_CODECOV_SCRIPT%"
44+
# - C:\julia\bin\julia -e "%JL_CODECOV_SCRIPT%"

src/closed.jl

+4
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,10 @@ function convert(::Type{R}, i::ClosedInterval{I}) where {R<:AbstractUnitRange,I<
100100
R(minimum(i), maximum(i))
101101
end
102102

103+
function (::Type{R})(i::ClosedInterval{I}) where {R<:AbstractUnitRange,I<:Integer}
104+
R(minimum(i), maximum(i))
105+
end
106+
103107
range(i::ClosedInterval{I}) where {I<:Integer} = convert(UnitRange{I}, i)
104108

105109
Base.promote_rule(::Type{ClosedInterval{T1}}, ::Type{ClosedInterval{T2}}) where {T1,T2} = ClosedInterval{promote_type(T1, T2)}

test/runtests.jl

+1
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ using Compat.Dates
1515
@test @inferred(convert(UnitRange, I)) === 0:3
1616
@test @inferred(range(I)) === 0:3
1717
@test @inferred(convert(UnitRange{Int16}, I)) === Int16(0):Int16(3)
18+
@test @inferred(UnitRange{Int16}(I)) === Int16(0):Int16(3)
1819
J = 3..2
1920
K = 5..4
2021
L = 3 ± 2

0 commit comments

Comments
 (0)