Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add a basic runtests.jl and update travis
Fix for some deprecations.
- Loading branch information
Showing
7 changed files
with
65 additions
and
25 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,13 @@ | ||
language: cpp | ||
compiler: | ||
- clang | ||
notifications: | ||
email: false | ||
before_install: | ||
- sudo add-apt-repository ppa:staticfloat/julia-deps -y | ||
- sudo add-apt-repository ppa:staticfloat/julianightlies -y | ||
- sudo apt-get update -qq -y | ||
- sudo apt-get install libpcre3-dev julia -y | ||
language: julia | ||
os: | ||
- linux | ||
- osx | ||
julia: | ||
- 0.3 | ||
- 0.4 | ||
- nightly | ||
script: | ||
- julia -e 'Pkg.init(); run(`ln -s $(pwd()) $(Pkg.dir("Autoreload"))`); Pkg.pin("Autoreload"); Pkg.resolve()' | ||
- julia -e 'using Autoreload; @assert isdefined(:Autoreload); @assert typeof(Autoreload) === Module' | ||
- if [[ -a .git/shallow ]]; then git fetch --unshallow; fi | ||
- julia --check-bounds=yes -e 'Pkg.clone(pwd()); Pkg.build("Autoreload"); Pkg.test("Autoreload"; coverage=true)' | ||
after_success: | ||
- julia -e 'cd(Pkg.dir("Autoreload")); Pkg.add("Coverage"); using Coverage; Coveralls.submit(process_folder()); Codecov.submit(process_folder())' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,15 @@ | ||
type AFile | ||
should_reload::Bool | ||
mtime::Float64 | ||
deps::Vector{String} | ||
deps::Vector{UTF8String} | ||
end | ||
|
||
type Dep | ||
should_reload::Bool | ||
name::String | ||
name::UTF8String | ||
end | ||
suppress_warnings = false | ||
const files = Dict{String,AFile}() | ||
const files = Dict{UTF8String,AFile}() | ||
const options = @compat Dict{Symbol,Any}(:constants=>false, :strip_types=>true, :smart_types=>true, :verbose_level=>:warn, :state=>:on) | ||
# verbose_level = :warn | ||
# state = :on |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
using Base.Test | ||
using Autoreload | ||
|
||
m1_before = """ | ||
module M | ||
type MyType | ||
x::Int | ||
end | ||
f(var::MyType) = 1 | ||
end | ||
""" | ||
|
||
m1_after = """ | ||
module M | ||
type MyType | ||
x::Int | ||
end | ||
f(var::MyType) = 2 | ||
end | ||
""" | ||
|
||
open(joinpath(dirname(@__FILE__), "M.jl"), "w") do f | ||
write(f, m1_before) | ||
end | ||
|
||
using Autoreload | ||
arequire("M") | ||
my_var = M.MyType(5) | ||
M.f(my_var) | ||
|
||
open(joinpath(dirname(@__FILE__), "M.jl"), "w") do f | ||
write(f, m1_after) | ||
end | ||
|
||
areload() | ||
@test M.f(my_var) == 2 | ||
|
||
rm(joinpath(dirname(@__FILE__), "M.jl")) |