Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix test for array indexing breakage #40

Merged
merged 2 commits into from
Nov 19, 2015
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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