diff --git a/.travis.yml b/.travis.yml index d971c1a..162d36c 100644 --- a/.travis.yml +++ b/.travis.yml @@ -5,6 +5,7 @@ os: - osx julia: - 0.7 + - 1.0 - nightly notifications: email: false @@ -25,13 +26,10 @@ git: #before_script: # homebrew for mac # - if [ $TRAVIS_OS_NAME = osx ]; then brew install gcc; fi -# uncomment the following lines to override the default test script -script: - - julia -e 'Pkg.clone(pwd()); Pkg.build("Setfield"); VERSION < v"0.7-" && Pkg.add("StaticArrays"); Pkg.test("Setfield"; coverage=true)' after_success: # push coverage results to Coveralls - - julia -e 'cd(Pkg.dir("Setfield")); Pkg.add("Coverage"); using Coverage; Coveralls.submit(Coveralls.process_folder())' + - julia -e 'using Pkg; cd(Pkg.dir("Setfield")); Pkg.add("Coverage"); using Coverage; Coveralls.submit(Coveralls.process_folder())' # push coverage results to Codecov - - julia -e 'cd(Pkg.dir("Setfield")); Pkg.add("Coverage"); using Coverage; Codecov.submit(Codecov.process_folder())' - - julia -e 'Pkg.add("Documenter")' - - julia -e 'cd(Pkg.dir("Setfield")); include(joinpath("docs", "make.jl"))' + - julia -e 'using Pkg; cd(Pkg.dir("Setfield")); Pkg.add("Coverage"); using Coverage; Codecov.submit(Codecov.process_folder())' + - julia -e 'using Pkg; Pkg.add("Documenter")' + - julia -e 'using Pkg; cd(Pkg.dir("Setfield")); include(joinpath("docs", "make.jl"))' diff --git a/test/runtests.jl b/test/runtests.jl index 7c076d8..5e65235 100644 --- a/test/runtests.jl +++ b/test/runtests.jl @@ -23,10 +23,8 @@ end include("test_kwonly.jl") end -@static if VERSION < v"0.7-" @testset "QuickTypes.jl" begin include("test_quicktypes.jl") end -end end # module diff --git a/test/test_quicktypes.jl b/test/test_quicktypes.jl index d2128f6..ed5a1ca 100644 --- a/test/test_quicktypes.jl +++ b/test/test_quicktypes.jl @@ -64,13 +64,13 @@ end end -@qstruct Pack{T}(animals::Vector{T}) +@qstruct Pack{T, N}(animals::NTuple{N, T}) @testset "Pack" begin - x = Pack([Cat(:Tama, 1), Cat(:Pochi, 2)]) + x = Pack((Cat(:Tama, 1), Cat(:Pochi, 2))) x = @set x.animals[2].nlegs = 5 - @test x.animals == [Cat(:Tama, 1), Cat(:Pochi, 2, 5)] + @test x.animals == (Cat(:Tama, 1), Cat(:Pochi, 2, 5)) end @@ -116,9 +116,9 @@ end @qstruct Group{x}(members::x; _concise_show=true) @testset "Group" begin - x = Group([0, 1]) + x = Group((0, 1)) x = @set x.members[2] = 111 - @test x.members == [0, 111] + @test x.members == (0, 111) end @settable @qstruct_fp Plane1(nwheels, weight::Number; brand=:zoomba)