Skip to content

Commit

Permalink
Merge pull request #40 from JuliaLang/yyc/0.5-getindex
Browse files Browse the repository at this point in the history
Fix test for array indexing breakage
  • Loading branch information
yuyichao committed Nov 19, 2015
2 parents c1db015 + 83d2476 commit 4ec5569
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
8 changes: 1 addition & 7 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,7 @@ julia:
- 0.3
- 0.4
- nightly
before_install:
- if [[ -a .git/shallow ]]; then git fetch --unshallow; fi
script:
- julia -e 'versioninfo(); Pkg.init(); Pkg.clone(pwd());'
- if [ $TRAVIS_JULIA_VERSION = "nightly" ]; then julia -e 'Pkg.test("ArrayViews", coverage=true)'; fi
- if [ $TRAVIS_JULIA_VERSION = "release" ]; then julia -e 'Pkg.test("ArrayViews")'; fi
after_success:
- if [ $TRAVIS_JULIA_VERSION = "nightly" ]; then julia -e 'cd(Pkg.dir("ArrayViews")); Pkg.add("Coverage"); using Coverage; Coveralls.submit(Coveralls.process_folder())'; fi
- if [ $TRAVIS_JULIA_VERSION != "0.3" ]; then julia -e 'cd(Pkg.dir("ArrayViews")); Pkg.add("Coverage"); using Coverage; Coveralls.submit(Coveralls.process_folder())'; fi
notifications:
email: false
10 changes: 8 additions & 2 deletions test/subviews.jl
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,14 @@ function _test_arrview(a, r, subs...)
_test_arrview_contents(unsafe_view(a, subs...), r)
end

macro test_arrview(a_, subs...)
esc(:(_test_arrview($a_, ($a_)[$(subs...)], $(subs...))))
if VERSION >= v"0.4"
macro test_arrview(a_, subs...)
esc(:(_test_arrview($a_, sub($a_, $(subs...)), $(subs...))))
end
else
macro test_arrview(a_, subs...)
esc(:(_test_arrview($a_, $a_[$(subs...)], $(subs...))))
end
end

#### test views from arrays
Expand Down

0 comments on commit 4ec5569

Please sign in to comment.