diff --git a/base/test.jl b/base/test.jl index c92733b0bc35b..395cb191e1fed 100644 --- a/base/test.jl +++ b/base/test.jl @@ -424,14 +424,16 @@ record(ts::DefaultTestSet, t::Broken) = (push!(ts.results, t); t) # For the other result types, immediately print the error message # but do not terminate. Print a backtrace. function record(ts::DefaultTestSet, t::Union{Fail, Error}) - print_with_color(:white, ts.description, ": ") - print(t) - # don't print the backtrace for Errors because it gets printed in the show - # method - isa(t, Error) || Base.show_backtrace(STDOUT, backtrace()) - println() + if myid() == 0 + print_with_color(:white, ts.description, ": ") + print(t) + # don't print the backtrace for Errors because it gets printed in the show + # method + isa(t, Error) || Base.show_backtrace(STDOUT, backtrace()) + println() + end push!(ts.results, t) - t + t, isa(t, Error) || backtrace() end # When a DefaultTestSet finishes, it records itself to its parent @@ -439,6 +441,16 @@ end # the results at the end of the tests record(ts::DefaultTestSet, t::AbstractTestSet) = push!(ts.results, t) +function print_test_errors(ts::DefaultTestSet) + for t in ts.results + if (isa(t, Error) || isa(t, Failure)) && myid() == 1 + Base.show(STDERR,t) + elseif isa(t, DefaultTestSet) + print_test_errors(t) + end + end +end + function print_test_results(ts::DefaultTestSet, depth_pad=0) # Calculate the overall number for each type so each of # the test result types are aligned @@ -531,8 +543,12 @@ function get_test_counts(ts::DefaultTestSet) c_passes, c_fails, c_errors, c_broken = 0, 0, 0, 0 for t in ts.results isa(t, Pass) && (passes += 1) - isa(t, Fail) && (fails += 1) - isa(t, Error) && (errors += 1) + if isa(t, Fail) + fails += 1 + end + if isa(t, Error) + errors += 1 + end isa(t, Broken) && (broken += 1) if isa(t, DefaultTestSet) np, nf, ne, nb, ncp, ncf, nce , ncb = get_test_counts(t) diff --git a/test/abstractarray.jl b/test/abstractarray.jl index 31b4a9863b9af..438e7b70e0274 100644 --- a/test/abstractarray.jl +++ b/test/abstractarray.jl @@ -1,6 +1,5 @@ # This file is a part of Julia. License is MIT: http://julialang.org/license -@testset "abstractarray" begin # Bounds checking A = rand(3,3,3) @test checkbounds(Bool, A, 1, 1, 1) == true @@ -630,5 +629,3 @@ let @test !issparse(m1) @test !issparse(m2) end - -end diff --git a/test/ambiguous.jl b/test/ambiguous.jl index 3020a9a8616d0..fa2bc54c269e8 100644 --- a/test/ambiguous.jl +++ b/test/ambiguous.jl @@ -1,6 +1,5 @@ # This file is a part of Julia. License is MIT: http://julialang.org/license -@testset "ambiguous" begin # DO NOT ALTER ORDER OR SPACING OF METHODS BELOW const lineoffset = @__LINE__ + 0 # XXX: __LINE__ at the end of a line is off-by-one ambig(x, y) = 1 @@ -171,4 +170,3 @@ let ms = methods(g16493, (Complex, Any)) end nothing -end diff --git a/test/arrayops.jl b/test/arrayops.jl index 1251589a85981..171cbda41e1bf 100644 --- a/test/arrayops.jl +++ b/test/arrayops.jl @@ -1,6 +1,5 @@ # This file is a part of Julia. License is MIT: http://julialang.org/license -@testset "arrayops" begin #Array test ## basics @@ -1663,5 +1662,3 @@ let A = zeros(3,3) @test size(A[:,UInt(1):UInt(2)]) == (3,2) @test size(similar(A, UInt(3), 0x3)) == size(similar(A, (UInt(3), 0x3))) == (3,3) end - -end diff --git a/test/backtrace.jl b/test/backtrace.jl index e0486dca61719..8267c689c7635 100644 --- a/test/backtrace.jl +++ b/test/backtrace.jl @@ -1,5 +1,5 @@ # This file is a part of Julia. License is MIT: http://julialang.org/license -@testset "backtrace" begin + bt = backtrace() have_backtrace = false for l in bt @@ -96,4 +96,3 @@ let @test i1 > 0 && i2 > 0 @test b1[i1].line != b2[i2].line end -end diff --git a/test/bigfloat.jl b/test/bigfloat.jl index d878b1817d22f..64b09a7c4de58 100644 --- a/test/bigfloat.jl +++ b/test/bigfloat.jl @@ -1,6 +1,5 @@ # This file is a part of Julia. License is MIT: http://julialang.org/license -@testset "bigfloat" begin @test big(2.0)^big(3) == 8 for T in [Int8, UInt8, Int16, UInt16, Int32, UInt32, Int64, UInt64, Int128, UInt128, BigInt] @@ -10,4 +9,3 @@ end # issue 15659 @test (setprecision(53) do; big(1/3); end) < 1//3 -end diff --git a/test/bigint.jl b/test/bigint.jl index beb2b31d0e03f..53cb5a9ccc7e2 100644 --- a/test/bigint.jl +++ b/test/bigint.jl @@ -1,6 +1,5 @@ # This file is a part of Julia. License is MIT: http://julialang.org/license -@testset "bigint" begin a = parse(BigInt,"123456789012345678901234567890") b = parse(BigInt,"123456789012345678901234567891") @@ -312,4 +311,3 @@ ndigits(rand(big(-999:999)), big(2)^rand(2:999)) @test big(5)^true == big(5) @test big(5)^false == one(BigInt) -end diff --git a/test/bitarray.jl b/test/bitarray.jl index f0c4a25b54cb9..a85b1207c36ab 100644 --- a/test/bitarray.jl +++ b/test/bitarray.jl @@ -1,6 +1,5 @@ # This file is a part of Julia. License is MIT: http://julialang.org/license -@testset "bitarray" begin tc{N}(r1::NTuple{N}, r2::NTuple{N}) = all(x->tc(x...), [zip(r1,r2)...]) tc{N}(r1::BitArray{N}, r2::Union{BitArray{N},Array{Bool,N}}) = true tc{T}(r1::T, r2::T) = true @@ -1353,5 +1352,3 @@ B = trues(Int64(10)) A = falses(Int32(10)) B = falses(Int64(10)) @test A == B - -end diff --git a/test/blas.jl b/test/blas.jl index 438fceb424be5..a5a6b793f1c36 100644 --- a/test/blas.jl +++ b/test/blas.jl @@ -2,7 +2,6 @@ import Base.LinAlg, Base.LinAlg.BlasReal, Base.LinAlg.BlasComplex -@testset "blas" begin srand(100) # syr2k! and her2k! for elty in (Float32, Float64, Complex64, Complex128) @@ -297,4 +296,3 @@ for elty in [Float32, Float64, Complex64, Complex128] end end -end diff --git a/test/ccall.jl b/test/ccall.jl index 9f75d7626196e..20e7245f880c5 100644 --- a/test/ccall.jl +++ b/test/ccall.jl @@ -2,7 +2,6 @@ import Base.copy, Base.== -@testset "ccall" begin const libccalltest = "libccalltest" const verbose = false @@ -850,5 +849,3 @@ else warn("ccall: no VecReg tests run for this platform") end - -end diff --git a/test/char.jl b/test/char.jl index ae0de94156f20..0c63e1da4590d 100644 --- a/test/char.jl +++ b/test/char.jl @@ -1,6 +1,5 @@ # This file is a part of Julia. License is MIT: http://julialang.org/license -@testset "char" begin @test typemin(Char) == Char(0) @test ndims(Char) == 0 @test getindex('a', 1) == 'a' @@ -194,4 +193,3 @@ let end @test !isequal('x', 120) -end diff --git a/test/checked.jl b/test/checked.jl index 248de7873d460..8a1d9a61d79f1 100644 --- a/test/checked.jl +++ b/test/checked.jl @@ -3,7 +3,6 @@ import Base: checked_abs, checked_neg, checked_add, checked_sub, checked_mul, checked_div, checked_rem, checked_fld, checked_mod, checked_cld -@testset "checked" begin # checked operations for T in (Int8, Int16, Int32, Int64, Int128) @@ -252,4 +251,3 @@ end @test checked_mul(UInt128(3), UInt128(4)) === UInt128(12) @test_throws OverflowError checked_mul(UInt128(2)^127, UInt128(2)) -end diff --git a/test/cmdlineargs.jl b/test/cmdlineargs.jl index 0ad144f01aeaf..05a698b067571 100644 --- a/test/cmdlineargs.jl +++ b/test/cmdlineargs.jl @@ -1,6 +1,5 @@ # This file is a part of Julia. License is MIT: http://julialang.org/license -@testset "cmdlineargs" begin let exename = `$(Base.julia_cmd()) --precompiled=yes` # --version let v = split(readstring(`$exename -v`), "julia version ")[end] @@ -281,5 +280,3 @@ let exename = `$(Base.julia_cmd())` @test readchomp(`$exename --precompiled=yes -E "Bool(Base.JLOptions().use_precompiled)"`) == "true" @test readchomp(`$exename --precompiled=no -E "Bool(Base.JLOptions().use_precompiled)"`) == "false" end - -end diff --git a/test/combinatorics.jl b/test/combinatorics.jl index 1d3c76d5a21c4..3e4975b6fe0ef 100644 --- a/test/combinatorics.jl +++ b/test/combinatorics.jl @@ -1,6 +1,5 @@ # This file is a part of Julia. License is MIT: http://julialang.org/license -@testset "combinatorics" begin @test binomial(5,-1) == 0 @test binomial(5,10) == 0 @test binomial(5,3) == 10 @@ -63,4 +62,3 @@ if Int === Int32 @test factorial(Int32(12)) === Int32(479001600) @test_throws OverflowError factorial(Int32(13)) end -end diff --git a/test/complex.jl b/test/complex.jl index 1a4773b342fda..89c3c15862e6f 100644 --- a/test/complex.jl +++ b/test/complex.jl @@ -1,6 +1,5 @@ # This file is a part of Julia. License is MIT: http://julialang.org/license -@testset "complex" begin @test reim(2 + 3im) == (2, 3) for T in (Int64, Float64) @@ -915,4 +914,3 @@ let x = 1+im @inferred sin(x) @inferred cos(x) end -end diff --git a/test/copy.jl b/test/copy.jl index eb00220ed2317..59adeebf2ec10 100644 --- a/test/copy.jl +++ b/test/copy.jl @@ -1,6 +1,5 @@ # This file is a part of Julia. License is MIT: http://julialang.org/license -@testset "copy" begin mainres = ([4, 5, 3], [1, 5, 3]) bitres = ([true, true, false], @@ -109,4 +108,3 @@ let x = BigFloat[1:1000;], y, z, v # Check that the setprecision indeed does something @test z != x end -end diff --git a/test/datafmt.jl b/test/datafmt.jl index f9f20499da2be..7116a2af614dc 100644 --- a/test/datafmt.jl +++ b/test/datafmt.jl @@ -1,6 +1,5 @@ # This file is a part of Julia. License is MIT: http://julialang.org/license -@testset "datafmt" begin # countlines @test countlines(IOBuffer("\n")) == 1 @test countlines(IOBuffer("\n"),'\r') == 0 @@ -263,4 +262,3 @@ for writefunc in ((io,x) -> show(io, "text/csv", x), @test vec(readcsv(io)) == x end end -end diff --git a/test/dates/accessors.jl b/test/dates/accessors.jl index 2d27d15736045..5e3313c6c2c42 100644 --- a/test/dates/accessors.jl +++ b/test/dates/accessors.jl @@ -1,6 +1,5 @@ # This file is a part of Julia. License is MIT: http://julialang.org/license -@testset "accessors" begin # yearmonthday is the opposite of totaldays # taking Rata Die Day # and returning proleptic Gregorian date @test Dates.yearmonthday(-306) == (0,2,29) @@ -195,4 +194,3 @@ dr = [a,a,a,a,a,a,a,a,a,a] @test Dates.second(dr) == repmat([0],10) @test Dates.millisecond(dr) == repmat([0],10) -end diff --git a/test/dates/adjusters.jl b/test/dates/adjusters.jl index 7834634695b29..7692bf47d1f8b 100644 --- a/test/dates/adjusters.jl +++ b/test/dates/adjusters.jl @@ -1,6 +1,5 @@ # This file is a part of Julia. License is MIT: http://julialang.org/license -@testset "adjustors" begin #trunc dt = Dates.Date(2012,12,21) @test trunc(dt,Dates.Year) == Dates.Date(2012) @@ -460,4 +459,3 @@ end) == 251 return sum == 15 end) == 15 # On average, there's one of those months every year -end diff --git a/test/dates/arithmetic.jl b/test/dates/arithmetic.jl index ead39ff13fd2d..44d53bd8b5ade 100644 --- a/test/dates/arithmetic.jl +++ b/test/dates/arithmetic.jl @@ -1,6 +1,5 @@ # This file is a part of Julia. License is MIT: http://julialang.org/license -@testset "arithmetic" begin # DateTime arithmetic a = Dates.DateTime(2013,1,1,0,0,0,1) b = Dates.DateTime(2013,1,1,0,0,0,0) @@ -390,4 +389,3 @@ t4 = [DateTime(2009,1,1,0,0,1), DateTime(2009,1,2,0,1), DateTime(2009,1,3,1)] @test (Date(2009,1,1):Week(1):Date(2009,1,21)) - (Date(2009,1,1):Day(1):Date(2009,1,3)) == [0d, 6d, 12d] @test (DateTime(2009,1,1,1,1,1):Second(1):DateTime(2009,1,1,1,1,3)) - (DateTime(2009,1,1,1,1):Second(1):DateTime(2009,1,1,1,1,2)) == [1s, 1s, 1s] -end diff --git a/test/dates/conversions.jl b/test/dates/conversions.jl index d28887b52ffa3..7b88d9c13fd07 100644 --- a/test/dates/conversions.jl +++ b/test/dates/conversions.jl @@ -1,6 +1,5 @@ # This file is a part of Julia. License is MIT: http://julialang.org/license -@testset "conversions" begin # Test conversion to and from unix @test Dates.unix2datetime(Dates.datetime2unix(DateTime(2000,1,1))) == DateTime(2000,1,1) @test Dates.value(Dates.DateTime(1970)) == Dates.UNIXEPOCH @@ -104,4 +103,3 @@ b = Dates.Date(2000) @test convert(Date,730120.0) == b @test convert(Date,Int32(730120)) == b -end diff --git a/test/dates/io.jl b/test/dates/io.jl index d321cc95248f5..11aea94137a1b 100644 --- a/test/dates/io.jl +++ b/test/dates/io.jl @@ -1,6 +1,5 @@ # This file is a part of Julia. License is MIT: http://julialang.org/license -@testset "io" begin # Test string/show representation of Date @test string(Dates.Date(1,1,1)) == "0001-01-01" # January 1st, 1 AD/CE @test sprint(show, Dates.Date(1,1,1)) == "0001-01-01" @@ -360,4 +359,3 @@ let @test DateTime(ds, format) == dt @test DateTime(ds, escaped_format) == dt end -end diff --git a/test/dates/periods.jl b/test/dates/periods.jl index 0e06aa0ace619..b05eeefbc7c52 100644 --- a/test/dates/periods.jl +++ b/test/dates/periods.jl @@ -1,6 +1,5 @@ # This file is a part of Julia. License is MIT: http://julialang.org/license -@testset "periods" begin # Period testing @test -Dates.Year(1) == Dates.Year(-1) @test Dates.Year(1) > Dates.Year(0) @@ -382,4 +381,3 @@ cpa = [1y+1s 1m+1s 1w+1s 1d+1s; 1h+1s 1mi+1s 2m+1s 1s+1ms] @test [1y+1s 1m+1s; 1w+1s 1d+1s] + [1y+1h 1y+1mi; 1y+1s 1y+1ms] == [2y+1h+1s 1y+1m+1mi+1s; 1y+1w+2s 1y+1d+1s+1ms] @test [1y+1s 1m+1s; 1w+1s 1d+1s] - [1y+1h 1y+1mi; 1y+1s 1y+1ms] == [1s-1h 1m+1s-1y-1mi; 1w-1y 1d+1s-1y-1ms] -end diff --git a/test/dates/query.jl b/test/dates/query.jl index 08e09256a5866..40b16bdb57c14 100644 --- a/test/dates/query.jl +++ b/test/dates/query.jl @@ -1,6 +1,5 @@ # This file is a part of Julia. License is MIT: http://julialang.org/license -@testset "query" begin # Name functions jan = Dates.DateTime(2013,1,1) #Tuesday feb = Dates.DateTime(2013,2,2) #Saturday @@ -199,4 +198,3 @@ end @test Dates.dayofquarter(Dates.DateTime(2014,9,30)) == 92 @test Dates.dayofquarter(Dates.DateTime(2014,12,31)) == 92 -end diff --git a/test/dates/ranges.jl b/test/dates/ranges.jl index 96c855a257a41..17e33bbaa2685 100644 --- a/test/dates/ranges.jl +++ b/test/dates/ranges.jl @@ -1,6 +1,5 @@ # This file is a part of Julia. License is MIT: http://julialang.org/license -@testset "ranges" begin function test_all_combos() for T in (Dates.Date,Dates.DateTime) f1 = T(2014); l1 = T(2013,12,31) @@ -504,4 +503,3 @@ let d = Dates.Day(1) @test (Dates.Date(2000):d:Dates.Date(2001))+d == (Dates.Date(2000)+d:d:Dates.Date(2001)+d) @test (Dates.Date(2000):d:Dates.Date(2001))-d == (Dates.Date(2000)-d:d:Dates.Date(2001)-d) end -end diff --git a/test/dates/types.jl b/test/dates/types.jl index 9ba250f34f653..1d1f6e63a6eed 100644 --- a/test/dates/types.jl +++ b/test/dates/types.jl @@ -1,6 +1,5 @@ # This file is a part of Julia. License is MIT: http://julialang.org/license -@testset "types" begin # Date internal algorithms @test Dates.totaldays(0,2,28) == -307 @test Dates.totaldays(0,2,29) == -306 @@ -173,4 +172,3 @@ ms = Dates.Millisecond(1) @test isfinite(Dates.Date) @test isfinite(Dates.DateTime) -end diff --git a/test/dict.jl b/test/dict.jl index a2b9b8e7f2646..c0cde55fcee63 100644 --- a/test/dict.jl +++ b/test/dict.jl @@ -1,6 +1,5 @@ # This file is a part of Julia. License is MIT: http://julialang.org/license -@testset "dict" begin # Pair p = Pair(1,2) @test p == (1=>2) @@ -551,4 +550,3 @@ let badKeys = UInt16[0xb800,0xa501,0xcdff,0x6303,0xe40a,0xcf0e,0xf3df,0xae99,0x9 end end end -end diff --git a/test/docs.jl b/test/docs.jl index a98a367b80273..a706eaa07bcb4 100644 --- a/test/docs.jl +++ b/test/docs.jl @@ -2,7 +2,6 @@ import Base.Docs: meta, @var, DocStr, parsedoc -@testset "docs" begin # Test helpers. function docstrings_equal(d1, d2) io1 = IOBuffer() @@ -882,4 +881,3 @@ for (line, expr) in Pair[ ] @test Docs.helpmode(line) == :(Base.Docs.@repl($expr)) end -end diff --git a/test/dsp.jl b/test/dsp.jl index 5ac4b51cadb19..b9c62581a2aff 100644 --- a/test/dsp.jl +++ b/test/dsp.jl @@ -1,6 +1,5 @@ # This file is a part of Julia. License is MIT: http://julialang.org/license -@testset "dsp" begin # Filter b = [1., 2., 3., 4.] x = [1., 1., 0., 1., 1., 0., 0., 0.] @@ -126,4 +125,3 @@ if Base.fftw_vendor() != :mkl @test psXdct![i] ≈ true_Xdct[i] end end # fftw_vendor() != :mkl -end diff --git a/test/enums.jl b/test/enums.jl index c44959b5cc192..ceab37287e51e 100644 --- a/test/enums.jl +++ b/test/enums.jl @@ -1,8 +1,5 @@ # This file is a part of Julia. License is MIT: http://julialang.org/license -module TestEnums - -@testset "enums" begin @test_throws MethodError convert(Enum, 1.0) @test_throws ArgumentError eval(:(@enum Foo)) @@ -167,5 +164,3 @@ let b = IOBuffer() @test deserialize(b) === apple end -end -end # module diff --git a/test/error.jl b/test/error.jl index 79a7896ebd109..4871727dc1357 100644 --- a/test/error.jl +++ b/test/error.jl @@ -1,6 +1,5 @@ # This file is a part of Julia. License is MIT: http://julialang.org/license -@testset "error" begin let function foo_error(c, n) c[1] += 1 @@ -57,4 +56,3 @@ let @test ex.msg == "foo" @test c[1] == 1 end -end diff --git a/test/examples.jl b/test/examples.jl index 7b06a0dcabd5e..20aaf967538ec 100644 --- a/test/examples.jl +++ b/test/examples.jl @@ -1,6 +1,5 @@ # This file is a part of Julia. License is MIT: http://julialang.org/license -@testset "examples" begin dir = joinpath(JULIA_HOME, Base.DOCDIR, "examples") include(joinpath(dir, "bubblesort.jl")) @@ -87,4 +86,3 @@ if !zmq_found end include(joinpath(dir, "clustermanager/0mq/ZMQCM.jl")) -end diff --git a/test/fastmath.jl b/test/fastmath.jl index cb309eed9eef1..25172cd0d896b 100644 --- a/test/fastmath.jl +++ b/test/fastmath.jl @@ -1,7 +1,5 @@ # This file is a part of Julia. License is MIT: http://julialang.org/license -@testset "fastmath" begin - # check expansions @test macroexpand(:(@fastmath 1+2)) == :(Base.FastMath.add_fast(1,2)) @@ -202,4 +200,3 @@ let a = ones(2,2), b = ones(2,2) local c = 0 @test Bool((@fastmath c |= 1)) end -end diff --git a/test/fft.jl b/test/fft.jl index 029f314e3e3b8..01875f96c9278 100644 --- a/test/fft.jl +++ b/test/fft.jl @@ -1,6 +1,5 @@ # This file is a part of Julia. License is MIT: http://julialang.org/license -@testset "fft" begin a = rand(8) + im*rand(8) @test norm(ifft(fft(a)) - a) < 1e-8 @@ -327,4 +326,3 @@ for x in (randn(10),randn(10,12)) # note: inference doesn't work for plan_fft_ since the # algorithm steps are included in the CTPlan type end -end diff --git a/test/file.jl b/test/file.jl index 68ba1b5f0facb..3c1e4381473e5 100644 --- a/test/file.jl +++ b/test/file.jl @@ -1,6 +1,5 @@ # This file is a part of Julia. License is MIT: http://julialang.org/license -@testset "file" begin ############################################# # Create some temporary files & directories # ############################################# @@ -1111,4 +1110,3 @@ end test_13559() end @test_throws ArgumentError mkpath("fakepath",-1) -end diff --git a/test/float16.jl b/test/float16.jl index 61cf206d48f1e..5dc768287dcc0 100644 --- a/test/float16.jl +++ b/test/float16.jl @@ -1,6 +1,5 @@ # This file is a part of Julia. License is MIT: http://julialang.org/license -@testset "float16" begin f = Float16(2.) g = Float16(1.) @@ -145,4 +144,4 @@ end # issue #17148 @test rem(Float16(1.2), Float16(one(1.2))) == 0.20019531f0 -end + diff --git a/test/floatapprox.jl b/test/floatapprox.jl index fbaefcafb749f..78308ca6b4e02 100644 --- a/test/floatapprox.jl +++ b/test/floatapprox.jl @@ -1,6 +1,5 @@ # This file is a part of Julia. License is MIT: http://julialang.org/license -@testset "floatapprox" begin # Floating point numbers - basic tests @test 4.00000000000001 ≈ 4.0 @test 5.0 ≈ 4.999999999999993 @@ -61,4 +60,3 @@ @test [0,Inf] ≈ [0,Inf] @test [0,Inf] ≉ [0,-Inf] -end diff --git a/test/functional.jl b/test/functional.jl index 9ccbff5042890..5042a81507bdc 100644 --- a/test/functional.jl +++ b/test/functional.jl @@ -1,6 +1,5 @@ # This file is a part of Julia. License is MIT: http://julialang.org/license -@testset "functional" begin # tests related to functional programming functions and styles # map -- array.jl @@ -484,4 +483,3 @@ let s = "Monkey 🙈🙊🙊" @test tf(2) == "Mo|nk|ey| 🙈|🙊🙊" @test tf(1) == "M|o|n|k|e|y| |🙈|🙊|🙊" end -end diff --git a/test/goto.jl b/test/goto.jl index 1c940e3abbe64..bcf9f05b98d44 100644 --- a/test/goto.jl +++ b/test/goto.jl @@ -1,6 +1,5 @@ # This file is a part of Julia. License is MIT: http://julialang.org/license -@testset "goto" begin function goto_test1() @goto a return false @@ -125,4 +124,3 @@ function f15561() end @test f15561() === nothing -end diff --git a/test/grisu.jl b/test/grisu.jl index 227bc59436e6a..2b8080439ad25 100644 --- a/test/grisu.jl +++ b/test/grisu.jl @@ -1,6 +1,5 @@ # This file is a part of Julia. License is MIT: http://julialang.org/license -@testset "grisu" begin using Base.Grisu function trimrep(buffer) @@ -1753,4 +1752,3 @@ len,point,neg = Grisu.grisu(1.0, Grisu.FIXED, 0, buffer) @test "1" == unsafe_string(pointer(buffer)) @test !neg -end diff --git a/test/i18n.jl b/test/i18n.jl index 6b3e6abc528af..7416a17157318 100644 --- a/test/i18n.jl +++ b/test/i18n.jl @@ -1,10 +1,8 @@ # This file is a part of Julia. License is MIT: http://julialang.org/license -@testset "i18n" begin using Base.I18n @test locale()=="" locale("en_US") @test locale()=="en_US" -end diff --git a/test/inference.jl b/test/inference.jl index 118a684d37b1a..05216b4786c83 100644 --- a/test/inference.jl +++ b/test/inference.jl @@ -1,6 +1,5 @@ # This file is a part of Julia. License is MIT: http://julialang.org/license -@testset "inference" begin # tests for Core.Inference correctness and precision # issue 9770 @@ -263,5 +262,3 @@ typealias NInt{N} Tuple{Vararg{Int, N}} fNInt(x::NInt) = (x...) gNInt() = fNInt(x) @test Base.return_types(gNInt, ()) == Any[NInt] - -end diff --git a/test/inline.jl b/test/inline.jl index 4916ddf1c8128..cbef30d2c7b31 100644 --- a/test/inline.jl +++ b/test/inline.jl @@ -1,6 +1,5 @@ # This file is a part of Julia. License is MIT: http://julialang.org/license -@testset "inline" begin """ Helper to walk the AST and call a function on every node. """ @@ -71,4 +70,3 @@ end g16165(x) = f16165(x) @test g16165(1) === (UInt(1) + 1) -end diff --git a/test/int.jl b/test/int.jl index 76ae34c7259fd..43b8dd244c63f 100644 --- a/test/int.jl +++ b/test/int.jl @@ -1,9 +1,7 @@ # This file is a part of Julia. License is MIT: http://julialang.org/license -@testset "int" begin # Test integer conversion routines from int.jl - for y in (-4, Float32(-4), -4.0, big(-4.0)) @test flipsign(3, y) == -3 @test flipsign(-3, y) == 3 @@ -196,5 +194,3 @@ end @test true << 2 === 1 << 2 @test true >> 2 === 1 >> 2 @test true >>> 2 === 1 >>> 2 - -end diff --git a/test/intfuncs.jl b/test/intfuncs.jl index c5851f2ebba48..50a1344ba7daa 100644 --- a/test/intfuncs.jl +++ b/test/intfuncs.jl @@ -1,6 +1,5 @@ # This file is a part of Julia. License is MIT: http://julialang.org/license -@testset "intfuncs" begin # Int32 and Int64 take different code paths -- test both for T in (Int32, Int64) @test gcd(T(3), T(5)) === T(1) @@ -143,5 +142,3 @@ end # issue #15911 @inferred string(1) - -end diff --git a/test/intset.jl b/test/intset.jl index fc49b147ed9df..a48fa34656237 100644 --- a/test/intset.jl +++ b/test/intset.jl @@ -1,7 +1,5 @@ # This file is a part of Julia. License is MIT: http://julialang.org/license -@testset "intset" begin - # Construction, collect data_in = (1,5,100) s = IntSet(data_in) @@ -130,4 +128,3 @@ pop!(j, 257) @test IntSet([1, 2, 4]) <= IntSet([1, 2, 4]) @test IntSet([]) <= IntSet([]) -end diff --git a/test/iobuffer.jl b/test/iobuffer.jl index 373f33f7348b6..4f90c81405187 100644 --- a/test/iobuffer.jl +++ b/test/iobuffer.jl @@ -1,6 +1,5 @@ # This file is a part of Julia. License is MIT: http://julialang.org/license -@testset "iobuffer" begin ioslength(io::IOBuffer) = (io.seekable ? io.size : nb_available(io)) let io = IOBuffer() @@ -215,4 +214,3 @@ end @test flush(IOBuffer()) === nothing # should be a no-op -end diff --git a/test/keywordargs.jl b/test/keywordargs.jl index 8edf99456b45e..bd22bf1c8f6ce 100644 --- a/test/keywordargs.jl +++ b/test/keywordargs.jl @@ -1,6 +1,5 @@ # This file is a part of Julia. License is MIT: http://julialang.org/license -@testset "kwargs" begin # simple keyword args case kwf1(ones; tens=0, hundreds=0) = ones + 10*tens + 100*hundreds @test kwf1(2) == 2 @@ -200,4 +199,3 @@ end @test ((a=1,b=2)->(a,b))(5) == (5,2) @test ((a=1,b=2)->(a,b))(5,6) == (5,6) -end diff --git a/test/libdl.jl b/test/libdl.jl index b10e274faf637..a938f2aa96ca6 100644 --- a/test/libdl.jl +++ b/test/libdl.jl @@ -1,6 +1,5 @@ # This file is a part of Julia. License is MIT: http://julialang.org/license -@testset "libdl" begin # these could fail on an embedded installation # but for now, we don't handle that case dlls = Libdl.dllist() @@ -184,4 +183,3 @@ end end -end diff --git a/test/linalg/arnoldi.jl b/test/linalg/arnoldi.jl index aa037ca3d2e2b..dd45b3bb4fb53 100644 --- a/test/linalg/arnoldi.jl +++ b/test/linalg/arnoldi.jl @@ -1,6 +1,5 @@ # This file is a part of Julia. License is MIT: http://julialang.org/license -@testset "arnoldi" begin debug = false debug && println("eigs") @@ -232,4 +231,3 @@ svds(rand(1:10, 10, 8)) @test_throws MethodError eigs(big(rand(1:10, 10, 10)), rand(1:10, 10, 10)) @test_throws MethodError svds(big(rand(1:10, 10, 8))) -end diff --git a/test/linalg/bidiag.jl b/test/linalg/bidiag.jl index 604d83bb54c10..46aee83cb0d95 100644 --- a/test/linalg/bidiag.jl +++ b/test/linalg/bidiag.jl @@ -1,6 +1,5 @@ # This file is a part of Julia. License is MIT: http://julialang.org/license -@testset "bidiag" begin import Base.LinAlg: BlasReal, BlasFloat debug = false @@ -282,4 +281,3 @@ let #fill! end end end -end diff --git a/test/linalg/bunchkaufman.jl b/test/linalg/bunchkaufman.jl index 1512d83b35d7d..2f989bf4c011b 100644 --- a/test/linalg/bunchkaufman.jl +++ b/test/linalg/bunchkaufman.jl @@ -1,6 +1,5 @@ # This file is a part of Julia. License is MIT: http://julialang.org/license -@testset "bunchkaufman" begin debug = false using Base.LinAlg: BlasComplex, BlasFloat, BlasReal, QRPivoted @@ -113,4 +112,3 @@ let v5 = view(v6, 1:5) @test F\v5 == F\v6[1:5] end -end diff --git a/test/linalg/cholesky.jl b/test/linalg/cholesky.jl index 22bc3d8d79c9a..41a5b0daee5b7 100644 --- a/test/linalg/cholesky.jl +++ b/test/linalg/cholesky.jl @@ -1,6 +1,5 @@ # This file is a part of Julia. License is MIT: http://julialang.org/license -@testset "cholesky" begin debug = false using Base.LinAlg: BlasComplex, BlasFloat, BlasReal, QRPivoted @@ -221,4 +220,3 @@ end @test_throws ArgumentError Base.LinAlg.cholfact!(randn(5,5),:U,Val{false}) @test_throws ArgumentError cholfact(randn(5,5),:U,Val{false}) -end diff --git a/test/linalg/dense.jl b/test/linalg/dense.jl index 0827540dd5b1b..8d9641b111614 100644 --- a/test/linalg/dense.jl +++ b/test/linalg/dense.jl @@ -1,6 +1,5 @@ # This file is a part of Julia. License is MIT: http://julialang.org/license -@testset "dense" begin debug = false # Check that non-floats are correctly promoted @@ -513,4 +512,3 @@ a = rand(10) b = view(a,2:2:10) @test Base.LinAlg.stride1(b) == 2 -end diff --git a/test/linalg/diagonal.jl b/test/linalg/diagonal.jl index 8dcc659355e93..3732815aefbc5 100644 --- a/test/linalg/diagonal.jl +++ b/test/linalg/diagonal.jl @@ -1,6 +1,5 @@ # This file is a part of Julia. License is MIT: http://julialang.org/license -@testset "diagonal" begin import Base.LinAlg: BlasFloat, BlasComplex, SingularException debug = false @@ -271,4 +270,3 @@ end Q = qrfact(randn(5,5))[:Q] @test D*Q' == Array(D)*Q' -end diff --git a/test/linalg/generic.jl b/test/linalg/generic.jl index 91aa594adfd9f..6b8814bdfd7fd 100644 --- a/test/linalg/generic.jl +++ b/test/linalg/generic.jl @@ -1,6 +1,5 @@ # This file is a part of Julia. License is MIT: http://julialang.org/license -@testset "generic" begin import Base: * # A custom Quaternion type with minimal defined interface and methods. @@ -283,4 +282,3 @@ end @test_throws ArgumentError Base.LinAlg.char_uplo(:Z) -end diff --git a/test/linalg/givens.jl b/test/linalg/givens.jl index 333054df69907..1af3d72c4911f 100644 --- a/test/linalg/givens.jl +++ b/test/linalg/givens.jl @@ -1,6 +1,5 @@ # This file is a part of Julia. License is MIT: http://julialang.org/license -@testset "givens" begin debug = false # Test givens rotations @@ -71,4 +70,3 @@ for elty in (Float32, Float64, Complex64, Complex128) @test abs((G*x)[2]) < eps(real(elty)) end end -end diff --git a/test/linalg/hessenberg.jl b/test/linalg/hessenberg.jl index 6970127f5753d..fcf4fa50a1a20 100644 --- a/test/linalg/hessenberg.jl +++ b/test/linalg/hessenberg.jl @@ -1,6 +1,5 @@ # This file is a part of Julia. License is MIT: http://julialang.org/license -@testset "hessenberg" begin debug = false using Base.LinAlg: BlasComplex, BlasFloat, BlasReal, QRPivoted @@ -35,4 +34,3 @@ let n = 10 end end end -end diff --git a/test/linalg/lapack.jl b/test/linalg/lapack.jl index 24d6f73c45cce..e9bd8a2a1f84f 100644 --- a/test/linalg/lapack.jl +++ b/test/linalg/lapack.jl @@ -1,6 +1,5 @@ # This file is a part of Julia. License is MIT: http://julialang.org/license -@testset "lapack" begin import Base.LinAlg.BlasInt @test_throws ArgumentError Base.LinAlg.LAPACK.chkside('Z') @@ -572,4 +571,3 @@ end let A = [NaN NaN; NaN NaN] @test_throws ArgumentError eigfact(A) end -end diff --git a/test/linalg/lq.jl b/test/linalg/lq.jl index 16eff55e5accb..438e6ed69ae82 100644 --- a/test/linalg/lq.jl +++ b/test/linalg/lq.jl @@ -1,6 +1,5 @@ # This file is a part of Julia. License is MIT: http://julialang.org/license -@testset "lq" begin debug = false using Base.LinAlg: BlasComplex, BlasFloat, BlasReal @@ -88,4 +87,3 @@ debug && println("Matmul with LQ factorizations") @test_throws BoundsError size(q,-1) end end -end diff --git a/test/linalg/lu.jl b/test/linalg/lu.jl index 5feab952abedb..f51049aef5788 100644 --- a/test/linalg/lu.jl +++ b/test/linalg/lu.jl @@ -1,6 +1,5 @@ # This file is a part of Julia. License is MIT: http://julialang.org/license -@testset "lu" begin debug = false import Base.LinAlg.BlasInt, Base.LinAlg.BlasFloat @@ -188,4 +187,3 @@ end @test @inferred(logdet(Complex64[1.0f0 0.5f0; 0.5f0 -1.0f0])) === 0.22314355f0 + 3.1415927f0im @test_throws DomainError logdet([1 1; 1 -1]) -end diff --git a/test/linalg/matmul.jl b/test/linalg/matmul.jl index 70d8aed19369b..a5b68fde29883 100644 --- a/test/linalg/matmul.jl +++ b/test/linalg/matmul.jl @@ -1,6 +1,5 @@ # This file is a part of Julia. License is MIT: http://julialang.org/license -@testset "matmul" begin ## Test Julia fallbacks to BLAS routines # matrices with zero dimensions @@ -400,4 +399,3 @@ B2 = rand(Float64, 6, 6) A_mul_B!(C1, A1, B1) @test @allocated(A_mul_B!(C1, A1, B1)) == @allocated(A_mul_B!(C2, A2, B2)) -end diff --git a/test/linalg/pinv.jl b/test/linalg/pinv.jl index 4559dbae4ec66..cc6444c334d2b 100644 --- a/test/linalg/pinv.jl +++ b/test/linalg/pinv.jl @@ -1,6 +1,5 @@ # This file is a part of Julia. License is MIT: http://julialang.org/license -@testset "pinv" begin debug = false function hilb(T::Type, n::Integer) @@ -320,4 +319,3 @@ for eltya in (Float32, Float64) @test a.diag[1] ≈ 0.0 @test a.diag[2] ≈ 0.0 end -end diff --git a/test/linalg/qr.jl b/test/linalg/qr.jl index f6d31244b53d9..04f4f657cedcd 100644 --- a/test/linalg/qr.jl +++ b/test/linalg/qr.jl @@ -1,6 +1,5 @@ # This file is a part of Julia. License is MIT: http://julialang.org/license -@testset "qr" begin debug = false using Base.LinAlg: BlasComplex, BlasFloat, BlasReal, QRPivoted @@ -181,4 +180,3 @@ B = rand(7,2) # Issue 16520 @test_throws DimensionMismatch ones(3,2)\(1:5) -end diff --git a/test/linalg/schur.jl b/test/linalg/schur.jl index 06d2d03e7d29f..1ff28166417ba 100644 --- a/test/linalg/schur.jl +++ b/test/linalg/schur.jl @@ -1,6 +1,5 @@ # This file is a part of Julia. License is MIT: http://julialang.org/license -@testset "schur" begin debug = false using Base.LinAlg: BlasComplex, BlasFloat, BlasReal, QRPivoted @@ -97,4 +96,3 @@ for eltya in (Float32, Float64, Complex64, Complex128, Int) @test NS[:Z] ≈ sZ end end -end diff --git a/test/linalg/special.jl b/test/linalg/special.jl index c9a8c45c1fc81..5bb43a7d771b2 100644 --- a/test/linalg/special.jl +++ b/test/linalg/special.jl @@ -1,6 +1,5 @@ # This file is a part of Julia. License is MIT: http://julialang.org/license -@testset "special" begin debug = false n= 10 #Size of matrix to test @@ -128,4 +127,3 @@ for typ in [UpperTriangular,LowerTriangular,Base.LinAlg.UnitUpperTriangular,Base @test Base.LinAlg.A_mul_Bc(atri,qrb[:Q]) ≈ full(atri) * qrb[:Q]' @test Base.LinAlg.A_mul_Bc!(copy(atri),qrb[:Q]) ≈ full(atri) * qrb[:Q]' end -end diff --git a/test/linalg/svd.jl b/test/linalg/svd.jl index 5966ef002c2fa..6a0eaf52bfc9f 100644 --- a/test/linalg/svd.jl +++ b/test/linalg/svd.jl @@ -1,6 +1,5 @@ # This file is a part of Julia. License is MIT: http://julialang.org/license -@testset "svd" begin debug = false using Base.LinAlg: BlasComplex, BlasFloat, BlasReal, QRPivoted @@ -81,4 +80,3 @@ for eltya in (Float32, Float64, Complex64, Complex128, Int) @test gsvd[:V]*gsvd[:D2]*gsvd[:R]*gsvd[:Q]' ≈ c end end -end diff --git a/test/linalg/symmetric.jl b/test/linalg/symmetric.jl index 2e1b696a0e6b4..dc3b32d668751 100644 --- a/test/linalg/symmetric.jl +++ b/test/linalg/symmetric.jl @@ -1,6 +1,5 @@ # This file is a part of Julia. License is MIT: http://julialang.org/license -@testset "symmetric" begin srand(101) debug = false #Turn on for more debugging info @@ -235,4 +234,3 @@ let A = Symmetric(randn(5,5)) B = -A @test A + B ≈ zeros(5,5) end -end diff --git a/test/linalg/triangular.jl b/test/linalg/triangular.jl index 70d044500d809..6215eabf081fb 100644 --- a/test/linalg/triangular.jl +++ b/test/linalg/triangular.jl @@ -1,6 +1,5 @@ # This file is a part of Julia. License is MIT: http://julialang.org/license -@testset "triangular" begin debug = false using Base.LinAlg: BlasFloat, errorbounds, full!, naivesub!, transpose!, UnitUpperTriangular, UnitLowerTriangular, A_rdiv_B!, A_rdiv_Bt!, A_rdiv_Bc! @@ -494,4 +493,3 @@ end # Issue 16196 @test UpperTriangular(eye(3)) \ view(ones(3), [1,2,3]) == ones(3) -end diff --git a/test/linalg/tridiag.jl b/test/linalg/tridiag.jl index c0d72d40c45b5..e57b4f4a23974 100644 --- a/test/linalg/tridiag.jl +++ b/test/linalg/tridiag.jl @@ -1,6 +1,5 @@ # This file is a part of Julia. License is MIT: http://julialang.org/license -@testset "tridiag" begin debug = false # basic tridiagonal operations @@ -462,4 +461,3 @@ SymTridiagonal([1, 2], [0])^3 == [1 0; 0 8] @test SymTridiagonal(1:3, 1:2) == [1 1 0; 1 2 2; 0 2 3] @test Tridiagonal(4:5, 1:3, 1:2) == [1 1 0; 4 2 2; 0 5 3] -end diff --git a/test/linalg/uniformscaling.jl b/test/linalg/uniformscaling.jl index e26c8d47385e8..1f9f2eb0d723d 100644 --- a/test/linalg/uniformscaling.jl +++ b/test/linalg/uniformscaling.jl @@ -1,6 +1,5 @@ # This file is a part of Julia. License is MIT: http://julialang.org/license -@testset "uniformscaling" begin srand(123) # Uniform scaling @@ -120,4 +119,3 @@ let AA = randn(2, 2) end end end -end diff --git a/test/lineedit.jl b/test/lineedit.jl index cf55c741b6c7f..bb398bc7de871 100644 --- a/test/lineedit.jl +++ b/test/lineedit.jl @@ -1,7 +1,5 @@ # This file is a part of Julia. License is MIT: http://julialang.org/license -@testset "lineedit" begin - using Base.LineEdit isdefined(:TestHelpers) || include(joinpath(dirname(@__FILE__), "TestHelpers.jl")) using TestHelpers @@ -403,4 +401,3 @@ let Base.LineEdit.InputAreaState(0,0), "julia> ", indent = 7) @test s == Base.LineEdit.InputAreaState(3,1) end -end diff --git a/test/loading.jl b/test/loading.jl index 3dc9db2a5e616..6e222b0278276 100644 --- a/test/loading.jl +++ b/test/loading.jl @@ -1,6 +1,5 @@ # This file is a part of Julia. License is MIT: http://julialang.org/license -@testset "loading" begin @test @__LINE__ == 5 include("test_sourcepath.jl") @@ -29,4 +28,3 @@ let paddedname = "Ztest_sourcepath.jl" filename = SubString(paddedname, 2, length(paddedname)) @test Base.find_in_path(filename) == abspath(paddedname[2:end]) end -end diff --git a/test/markdown.jl b/test/markdown.jl index ebc0b17a2aae2..d30ef1fa2367a 100644 --- a/test/markdown.jl +++ b/test/markdown.jl @@ -1,6 +1,5 @@ # This file is a part of Julia. License is MIT: http://julialang.org/license -@test "markdown" begin using Base.Markdown import Base.Markdown: MD, Paragraph, Header, Italic, Bold, LineBreak, plain, term, html, rst, Table, Code, LaTeX, Footnote import Base: show @@ -464,4 +463,3 @@ let t_1 = "`code` ``math`` ```code``` ````math```` `````code`````", LaTeX("math at end of string"), ])) end -end diff --git a/test/math.jl b/test/math.jl index 2cbfff0c9ad5e..608577d672c24 100644 --- a/test/math.jl +++ b/test/math.jl @@ -1,5 +1,4 @@ # This file is a part of Julia. License is MIT: http://julialang.org/license -@testset "math" begin @testset "clamp" begin @test clamp(0, 1, 3) == 1 @test clamp(1, 1, 3) == 1 @@ -866,4 +865,3 @@ end @test Base.Math.f32(complex(1.0,1.0)) == complex(Float32(1.),Float32(1.)) @test Base.Math.f16(complex(1.0,1.0)) == complex(Float16(1.),Float16(1.)) -end diff --git a/test/meta.jl b/test/meta.jl index 33d1c99b9edcd..9e1c69106bd23 100644 --- a/test/meta.jl +++ b/test/meta.jl @@ -1,6 +1,5 @@ # This file is a part of Julia. License is MIT: http://julialang.org/license -@testset "meta" begin module MetaTest function f(x) @@ -115,4 +114,3 @@ show_sexpr(ioB,:(1+1)) show_sexpr(ioB,QuoteNode(1),1) end -end diff --git a/test/misc.jl b/test/misc.jl index 19d6a894650fa..b316393ebd319 100644 --- a/test/misc.jl +++ b/test/misc.jl @@ -1,6 +1,5 @@ # This file is a part of Julia. License is MIT: http://julialang.org/license -@testset "misc" begin # Test info @test contains(sprint(io->info(io,"test")), "INFO:") @test contains(sprint(io->info(io,"test")), "INFO: test") @@ -387,4 +386,3 @@ optstring = sprint(show, Base.JLOptions()) @test startswith(optstring, "JLOptions(") @test endswith(optstring, ")") -end diff --git a/test/mmap.jl b/test/mmap.jl index d8fe564d0658f..a1120d6213702 100644 --- a/test/mmap.jl +++ b/test/mmap.jl @@ -1,6 +1,5 @@ # This file is a part of Julia. License is MIT: http://julialang.org/license -@testset "mmap" begin file = tempname() write(file, "Hello World\n") t = "Hello World".data @@ -293,4 +292,3 @@ open(file, "r+") do s end rm(file) -end diff --git a/test/mod2pi.jl b/test/mod2pi.jl index 70f7510f69a74..5105ba75a9ae0 100644 --- a/test/mod2pi.jl +++ b/test/mod2pi.jl @@ -1,6 +1,5 @@ # This file is a part of Julia. License is MIT: http://julialang.org/license -@testset "mod2pi" begin # NOTES on range reduction # [1] compute numbers near pi: http://www.cs.berkeley.edu/~wkahan/testpi/nearpi.c # [2] range reduction: http://hal-ujm.ccsd.cnrs.fr/docs/00/08/69/04/PDF/RangeReductionIEEETC0305.pdf @@ -196,4 +195,3 @@ testModPi() @test mod2pi(Int64(2)^60) == mod2pi(2.0^60) @test_throws ArgumentError mod2pi(Int64(2)^60-1) -end diff --git a/test/mpfr.jl b/test/mpfr.jl index 810620c34ae53..0a28a86947ecf 100644 --- a/test/mpfr.jl +++ b/test/mpfr.jl @@ -1,6 +1,5 @@ # This file is a part of Julia. License is MIT: http://julialang.org/license -@testset "mpfr" begin import Base.MPFR # constructors setprecision(53) do @@ -875,4 +874,3 @@ end @test isnan(sqrt(BigFloat(NaN))) -end diff --git a/test/nullable.jl b/test/nullable.jl index 68f7fa19bc728..6ceb054971a4a 100644 --- a/test/nullable.jl +++ b/test/nullable.jl @@ -1,6 +1,5 @@ # This file is a part of Julia. License is MIT: http://julialang.org/license -@testset "nullable" begin types = [ Bool, Float16, @@ -319,4 +318,3 @@ end # issue #11675 @test repr(Nullable()) == "Nullable{Union{}}()" -end diff --git a/test/offsetarray.jl b/test/offsetarray.jl index 1847d3af87e23..885ea7797f5ec 100644 --- a/test/offsetarray.jl +++ b/test/offsetarray.jl @@ -1,6 +1,5 @@ # This file is a part of Julia. License is MIT: http://julialang.org/license -@testset "offsetarrays" begin # OffsetArrays (arrays with indexing that doesn't start at 1) # This test file is designed to exercise support for generic indexing, @@ -359,4 +358,3 @@ v = OffsetArray(rand(8), (-2,)) @test A+A == OffsetArray(parent(A)+parent(A), A.offsets) @test A.*A == OffsetArray(parent(A).*parent(A), A.offsets) -end diff --git a/test/operators.jl b/test/operators.jl index 4e472a0a7a8eb..36f80a6033ddf 100644 --- a/test/operators.jl +++ b/test/operators.jl @@ -1,6 +1,5 @@ # This file is a part of Julia. License is MIT: http://julialang.org/license -@testset "operators" begin @test ifelse(true, 1, 2) == 1 @test ifelse(false, 1, 2) == 2 @@ -56,4 +55,3 @@ let xs = [[i:i+4;] for i in 1:10] @test max(xs[1:n]...) == [n:n+4;] end end -end diff --git a/test/parse.jl b/test/parse.jl index c4b8de242a54a..3fc6b8869215f 100644 --- a/test/parse.jl +++ b/test/parse.jl @@ -1,6 +1,5 @@ # This file is a part of Julia. License is MIT: http://julialang.org/license -@testset "parse" begin function parseall(str) pos = start(str) exs = [] @@ -538,4 +537,3 @@ end @test get(tryparse(Bool, "false")) === get(Nullable{Bool}(false)) @test_throws ArgumentError parse(Int, "2", 1) @test_throws ArgumentError parse(Int, "2", 63) -end diff --git a/test/path.jl b/test/path.jl index 2516b80bffa67..5f0de09456f30 100644 --- a/test/path.jl +++ b/test/path.jl @@ -1,6 +1,5 @@ # This file is a part of Julia. License is MIT: http://julialang.org/license -@testset "path" begin for S in (String, GenericString) dir = pwd() sep = Base.Filesystem.path_separator @@ -190,4 +189,3 @@ test_relpath() @test isa(joinpath("a", "b"), String) @test isa(joinpath(abspath("a"), "b"), String) -end diff --git a/test/pkg.jl b/test/pkg.jl index 53aaef47433f3..fa29e0ffbb7f3 100644 --- a/test/pkg.jl +++ b/test/pkg.jl @@ -1,6 +1,5 @@ # This file is a part of Julia. License is MIT: http://julialang.org/license -@testset "pkg" begin import Base.Pkg.PkgError function temp_pkg_dir(fn::Function, remove_tmp_dir::Bool=true) @@ -401,4 +400,3 @@ temp_pkg_dir() do end end -end diff --git a/test/pollfd.jl b/test/pollfd.jl index 8cd035d76d20a..7e6ce8185aead 100644 --- a/test/pollfd.jl +++ b/test/pollfd.jl @@ -1,6 +1,5 @@ # This file is a part of Julia. License is MIT: http://julialang.org/license -@testset "pollfd" begin # This script does the following # Sets up n unix pipes # For the odd pipes, a byte is written to the write end at intervals specified in intvls @@ -116,4 +115,3 @@ let a = [] sleep(0.2) @test a == [1] end -end diff --git a/test/printf.jl b/test/printf.jl index f1888c6ad6cbb..a23e6f7e4b9e8 100644 --- a/test/printf.jl +++ b/test/printf.jl @@ -1,6 +1,5 @@ # This file is a part of Julia. License is MIT: http://julialang.org/license -@testset "printf" begin # int @test (@sprintf "%d" typemax(Int64)) == "9223372036854775807" @test (@sprintf "%a" typemax(Int64)) == "0x7.fffffffffffffffp+60" @@ -247,4 +246,3 @@ end # @printf @test_throws ArgumentError eval(:(@printf 1)) -end diff --git a/test/priorityqueue.jl b/test/priorityqueue.jl index 93f2f48254c53..b8056db370d23 100644 --- a/test/priorityqueue.jl +++ b/test/priorityqueue.jl @@ -1,6 +1,5 @@ # This file is a part of Julia. License is MIT: http://julialang.org/license -@testset "priorityqueue" begin using Base.Collections # Test dequeing in sorted order. @@ -109,4 +108,3 @@ for priority in values(priorities) end @test issorted([heappop!(xs) for _ in length(priorities)]) -end diff --git a/test/profile.jl b/test/profile.jl index 0dc7f4c01afe4..6358b65e3c5d4 100644 --- a/test/profile.jl +++ b/test/profile.jl @@ -1,6 +1,5 @@ # This file is a part of Julia. License is MIT: http://julialang.org/license -@testset "profile" begin function busywait(t, n_tries) iter = 0 while iter < n_tries && Profile.len_data() == 0 @@ -33,4 +32,3 @@ let iobuf = IOBuffer() Profile.clear() @test isempty(Profile.fetch()) end -end diff --git a/test/random.jl b/test/random.jl index 6bd538dc9d932..91358626f5601 100644 --- a/test/random.jl +++ b/test/random.jl @@ -1,6 +1,5 @@ # This file is a part of Julia. License is MIT: http://julialang.org/license -@testset "random" begin # Issue #6573 srand(0); rand(); x = rand(384); @test find(x .== rand()) == [] @@ -445,4 +444,3 @@ let seed = rand(UInt32, 10) resize!(seed, 4) @test r.seed != seed end -end diff --git a/test/ranges.jl b/test/ranges.jl index 8e6942badc41d..aa9515b0f71dc 100644 --- a/test/ranges.jl +++ b/test/ranges.jl @@ -1,6 +1,5 @@ # This file is a part of Julia. License is MIT: http://julialang.org/license -@testset "ranges" begin @test size(10:1:0) == (0,) @test length(1:.2:2) == 6 @test length(1.:.2:2.) == 6 @@ -736,4 +735,3 @@ let r = 1:3, a = [1,2,3] @test convert(Array{Int,1}, r) == a @test convert(Array{Float64,1}, r) == a end -end diff --git a/test/read.jl b/test/read.jl index ee1842496f361..1184939e5751a 100644 --- a/test/read.jl +++ b/test/read.jl @@ -1,6 +1,5 @@ # This file is a part of Julia. License is MIT: http://julialang.org/license -@testset "read" begin mktempdir() do dir tasks = [] @@ -490,4 +489,3 @@ rm(f) end # mktempdir() do dir -end diff --git a/test/reduce.jl b/test/reduce.jl index 8ae117b312cd5..4edf431e14966 100644 --- a/test/reduce.jl +++ b/test/reduce.jl @@ -1,6 +1,5 @@ # This file is a part of Julia. License is MIT: http://julialang.org/license -@testset "reduce" begin # fold(l|r) & mapfold(l|r) @test foldl(-, 1:5) == -13 @test foldl(-, 10, 1:5) == -5 @@ -295,4 +294,3 @@ let A = collect(1:10) @test A ∌ 11 @test contains(==,A,6) end -end diff --git a/test/reducedim.jl b/test/reducedim.jl index 6b798559da63a..eb3c218dd00ef 100644 --- a/test/reducedim.jl +++ b/test/reducedim.jl @@ -1,6 +1,5 @@ # This file is a part of Julia. License is MIT: http://julialang.org/license -@testset "reducedim" begin # main tests function safe_mapslices(op, A, region) @@ -155,4 +154,3 @@ for region in Any[-1, 0, (-1, 2), [0, 1], (1,-2,3), [0 1; @test_throws ArgumentError maxabs(Areduc, region) @test_throws ArgumentError minabs(Areduc, region) end -end diff --git a/test/reflection.jl b/test/reflection.jl index 2223f4daac1b6..cb97dc3d97788 100644 --- a/test/reflection.jl +++ b/test/reflection.jl @@ -1,6 +1,5 @@ # This file is a part of Julia. License is MIT: http://julialang.org/license -@testset "reflection" begin # code_native / code_llvm (issue #8239) # It's hard to really test these, but just running them should be # sufficient to catch segfault bugs. @@ -495,4 +494,3 @@ if is_windows() else @test isnull(h16850) end -end diff --git a/test/regex.jl b/test/regex.jl index e18a97009f64c..33ad25e934f44 100644 --- a/test/regex.jl +++ b/test/regex.jl @@ -1,6 +1,5 @@ # This file is a part of Julia. License is MIT: http://julialang.org/license -@testset "regex" begin function collect_eachmatch(re, str, overlap=false) [m.match for m in collect(eachmatch(re, str, overlap))] end @@ -49,4 +48,3 @@ end @test replace("abcde", r"(..)(?Pd)", s"\gxy\\\1") == "adxy\\bce" @test_throws ErrorException replace("a", r"(?P)", s"\g") -end diff --git a/test/repl.jl b/test/repl.jl index f541616fa5539..cc89fc36ce81b 100644 --- a/test/repl.jl +++ b/test/repl.jl @@ -1,6 +1,5 @@ # This file is a part of Julia. License is MIT: http://julialang.org/license -@testset "repl" begin isdefined(:TestHelpers) || include(joinpath(dirname(@__FILE__), "TestHelpers.jl")) using TestHelpers import Base: REPL, LineEdit @@ -488,4 +487,3 @@ if !is_windows() || Sys.windows_version() >= Sys.WINDOWS_VISTA_VER end end # let exename -end diff --git a/test/replutil.jl b/test/replutil.jl index 8ad1d8258c778..a272c23a4dba1 100644 --- a/test/replutil.jl +++ b/test/replutil.jl @@ -1,6 +1,5 @@ # This file is a part of Julia. License is MIT: http://julialang.org/license -@testset "replutil" begin function test_have_color(buf, color, no_color) if Base.have_color @test takebuf_string(buf) == color @@ -406,4 +405,3 @@ let d = Dict(1 => 2, 3 => 45) @test contains(replace(result, " ", ""), string(el)) end end -end diff --git a/test/resolve.jl b/test/resolve.jl index 3aaf28bb28d30..f49797b1a4fd8 100644 --- a/test/resolve.jl +++ b/test/resolve.jl @@ -1,6 +1,5 @@ # This file is a part of Julia. License is MIT: http://julialang.org/license -@testset "resolve" begin using Base.Pkg.Types using Base.Pkg.Query using Base.Pkg.Resolve @@ -533,4 +532,3 @@ reqs_data = Any[ want = resolve_tst(deps_data, reqs_data) @test want == Dict("A"=>v"1", "B"=>v"2", "C"=>v"2", "D"=>v"2", "E"=>v"2") -end diff --git a/test/rounding.jl b/test/rounding.jl index c6c7b9a9eb390..bf2ebbf05ef83 100644 --- a/test/rounding.jl +++ b/test/rounding.jl @@ -1,6 +1,5 @@ # This file is a part of Julia. License is MIT: http://julialang.org/license -@testset "rounding" begin # Small sanity tests to ensure changing the rounding of float functions work ## Float64 checks @@ -138,4 +137,3 @@ badness = 1//0 @test_throws DivideError round(Int64,badness,RoundNearestTiesAway) @test_throws DivideError round(Int64,badness,RoundNearestTiesUp) -end diff --git a/test/runtests.jl b/test/runtests.jl index 811d7e5177432..702628eac2d8b 100644 --- a/test/runtests.jl +++ b/test/runtests.jl @@ -32,7 +32,6 @@ cd(dirname(@__FILE__)) do end @everywhere include("testdefs.jl") - results=[] @sync begin for p in workers() @@ -43,19 +42,9 @@ cd(dirname(@__FILE__)) do try resp = remotecall_fetch(t -> runtests(t), p, test) catch e - resp = e + resp = [e] end push!(results, (test, resp)) - if (isa(resp, Integer) && (resp > max_worker_rss)) || isa(resp, Exception) - if n > 1 - rmprocs(p, waitfor=0.5) - p = addprocs(1; exeflags=`--check-bounds=yes --depwarn=error`)[1] - remotecall_fetch(()->include("testdefs.jl"), p) - else - # single process testing, bail if mem limit reached, or, on an exception. - isa(resp, Exception) ? rethrow(resp) : error("Halting tests. Memory limit reached : $resp > $max_worker_rss") - end - end end end end @@ -63,7 +52,6 @@ cd(dirname(@__FILE__)) do # Free up memory =) n > 1 && rmprocs(workers(), waitfor=5.0) - for t in node1_tests n > 1 && print("\tFrom worker 1:\t") test, resp = runtests(t) @@ -73,14 +61,21 @@ cd(dirname(@__FILE__)) do o_ts = Base.Test.DefaultTestSet("Overall") Base.Test.push_testset(o_ts) for res in results - Base.Test.push_testset(res[2][1]) - push!(o_ts.results, res[2][1]) - Base.Test.pop_testset() + Base.Test.push_testset(res[2][1]) + Base.Test.record(o_ts, res[2][1]) + Base.Test.pop_testset() end - Base.Test.print_test_results(o_ts,1) + println() + Base.Test.print_test_results(o_ts,0) for res in results println("Tests for $(res[1]) took $(res[2][2]) seconds, of which $(res[2][4]) were spent in gc ($(100*res[2][4]/res[2][2]) % ), and allocated $(res[2][3]) bytes.") end - println(" \033[32;1mSUCCESS\033[0m") + if !o_ts.anynonpass + println(" \033[32;1mSUCCESS\033[0m") + else + println(" \033[31;1mFAILURE\033[0m") + Base.Test.print_test_errors(o_ts) + error() + end end diff --git a/test/serialize.jl b/test/serialize.jl index 24970bb2c4100..9622f69344865 100644 --- a/test/serialize.jl +++ b/test/serialize.jl @@ -1,6 +1,5 @@ # This file is a part of Julia. License is MIT: http://julialang.org/license -@testset "serialize" begin # Check that serializer hasn't gone out-of-frame @test Serializer.sertag(Symbol) == 2 @test Serializer.sertag(()) == 46 @@ -411,4 +410,3 @@ let seek(f,0) @test deserialize(f) === :β end -end diff --git a/test/sets.jl b/test/sets.jl index 0e05363f7769c..da15ff2905656 100644 --- a/test/sets.jl +++ b/test/sets.jl @@ -1,6 +1,5 @@ # This file is a part of Julia. License is MIT: http://julialang.org/license -@testset "sets" begin # Construction, collect @test is(typeof(Set([1,2,3])), Set{Int}) @test is(typeof(Set{Int}([3])), Set{Int}) @@ -246,4 +245,3 @@ end @test length(Set(['x',120])) == 2 -end diff --git a/test/show.jl b/test/show.jl index 04469932c1ecb..989e311b3a565 100644 --- a/test/show.jl +++ b/test/show.jl @@ -500,4 +500,3 @@ let s = IOBuffer(Array{UInt8}(0), true, true) Base.showarray(s, [1,2,3], false, header = false) @test String(resize!(s.data, s.size)) == " 1\n 2\n 3" end -end diff --git a/test/simdloop.jl b/test/simdloop.jl index b457eef554758..1cdabe924e12d 100644 --- a/test/simdloop.jl +++ b/test/simdloop.jl @@ -1,6 +1,5 @@ # This file is a part of Julia. License is MIT: http://julialang.org/license -@testset "simdloop" begin function simd_loop_example_from_manual(x, y, z) s = zero(eltype(z)) n = min(length(x),length(y),length(z)) @@ -139,4 +138,3 @@ end @test 2001000 == simd_sum_over_array(collect(1:2000)) @test 2001000 == simd_sum_over_array(Float32[i+j*500 for i=1:500, j=0:3]) -end diff --git a/test/socket.jl b/test/socket.jl index bbed720a4b937..241f6a752477f 100644 --- a/test/socket.jl +++ b/test/socket.jl @@ -1,6 +1,5 @@ # This file is a part of Julia. License is MIT: http://julialang.org/license -@testset "socket" begin @test ip"127.0.0.1" == IPv4(127,0,0,1) @test ip"192.0" == IPv4(192,0,0,0) @test ip"192.0xFFF" == IPv4(192,0,15,255) @@ -318,4 +317,3 @@ let @test test_connect(addr) end -end diff --git a/test/sorting.jl b/test/sorting.jl index 9a760d1fcbf98..00ad860d061a2 100644 --- a/test/sorting.jl +++ b/test/sorting.jl @@ -1,6 +1,5 @@ # This file is a part of Julia. License is MIT: http://julialang.org/license -@testset "sorting" begin using Base.Order: Forward @test sort([2,3,1]) == [1,2,3] @@ -350,4 +349,3 @@ end # issue #12833 - type stability of sort @test Base.return_types(sort, (Vector{Int},)) == [Vector{Int}] -end diff --git a/test/sparsedir/cholmod.jl b/test/sparsedir/cholmod.jl index c4c7b37cf0a9a..47906c3fd2cf3 100644 --- a/test/sparsedir/cholmod.jl +++ b/test/sparsedir/cholmod.jl @@ -1,6 +1,5 @@ # This file is a part of Julia. License is MIT: http://julialang.org/license -@testset "cholmod" begin srand(123) using Base.SparseArrays.CHOLMOD @@ -650,4 +649,3 @@ A = sprandn(5,5,0.4) |> t -> t't + I B = complex(randn(5,2), randn(5,2)) @test cholfact(A)\B ≈ A\B -end diff --git a/test/sparsedir/sparse.jl b/test/sparsedir/sparse.jl index de510d0b13b73..c6b678ea648dd 100644 --- a/test/sparsedir/sparse.jl +++ b/test/sparsedir/sparse.jl @@ -1,6 +1,5 @@ # This file is a part of Julia. License is MIT: http://julialang.org/license -@testset "sparse" begin @test issparse(sparse(ones(5,5))) @test !issparse(ones(5,5)) @test Base.SparseArrays.indtype(sparse(ones(Int8,2),ones(Int8,2),rand(2))) == Int8 @@ -1390,4 +1389,3 @@ end # Test temporary fix for issue #16548 in PR #16979. Brittle. Expect to remove with `\` revisions. @test which(\, (SparseMatrixCSC, AbstractVecOrMat)).module == Base.SparseArrays -end diff --git a/test/sparsedir/sparsevector.jl b/test/sparsedir/sparsevector.jl index 145226df8baf6..ca94ed7974832 100644 --- a/test/sparsedir/sparsevector.jl +++ b/test/sparsedir/sparsevector.jl @@ -1,6 +1,5 @@ # This file is a part of Julia. License is MIT: http://julialang.org/license -@testset "sparsevector" begin ### Data spv_x1 = SparseVector(8, [2, 5, 6], [1.25, -0.75, 3.5]) @@ -1028,4 +1027,3 @@ end @test issparse([sprand(10,.1) rand(10)]) @test issparse([sprand(10,.1); rand(10)]) -end diff --git a/test/sparsedir/spqr.jl b/test/sparsedir/spqr.jl index bc0c2efc21466..941f9cc5c484d 100644 --- a/test/sparsedir/spqr.jl +++ b/test/sparsedir/spqr.jl @@ -1,6 +1,5 @@ # This file is a part of Julia. License is MIT: http://julialang.org/license -@testset "spqr" begin using Base.SparseArrays.SPQR using Base.SparseArrays.CHOLMOD @@ -59,4 +58,3 @@ seekstart(b) @test_throws ArgumentError deserialize(b)\ones(10) end -end diff --git a/test/sparsedir/umfpack.jl b/test/sparsedir/umfpack.jl index ea78ea58726b5..3c3bdb8e59faf 100644 --- a/test/sparsedir/umfpack.jl +++ b/test/sparsedir/umfpack.jl @@ -1,6 +1,5 @@ # This file is a part of Julia. License is MIT: http://julialang.org/license -@testset "umfpack" begin se33 = speye(3) do33 = ones(3) @test isequal(se33 \ do33, do33) @@ -136,4 +135,3 @@ let aa = complex(a) @test_throws ArgumentError Base.SparseArrays.UMFPACK.solve!(aa, lufact(complex(speye(5,5))), aa, Base.SparseArrays.UMFPACK.UMFPACK_A) end -end diff --git a/test/spawn.jl b/test/spawn.jl index a982bd010b2a8..68d41d50cf631 100644 --- a/test/spawn.jl +++ b/test/spawn.jl @@ -1,6 +1,5 @@ # This file is a part of Julia. License is MIT: http://julialang.org/license -@testset "spawn" begin ################################## # Cross Plaform tests for spawn. # ################################## @@ -375,4 +374,3 @@ end @test_throws ArgumentError reduce(&, Base.Cmd[]) @test reduce(&, [`echo abc`, `echo def`, `echo hij`]) == `echo abc` & `echo def` & `echo hij` -end diff --git a/test/stacktraces.jl b/test/stacktraces.jl index b8f15ff0fe5d6..8cab2459da73b 100644 --- a/test/stacktraces.jl +++ b/test/stacktraces.jl @@ -1,7 +1,5 @@ # This file is a part of Julia. License is MIT: http://julialang.org/license -@testset "stacktraces" begin - let @noinline child() = stacktrace() @noinline parent() = child() @@ -98,4 +96,3 @@ for (frame, func, inlined) in zip(trace, [g,h,f], (can_inline, can_inline, false @test frame.inlined === inlined end end -end diff --git a/test/string.jl b/test/string.jl index 1056cb5e16563..99705746134ff 100644 --- a/test/string.jl +++ b/test/string.jl @@ -1,10 +1,8 @@ # This file is a part of Julia. License is MIT: http://julialang.org/license ## generic string uses only endof and next; used for testing ## -@testset "strings" begin include("strings/basic.jl") include("strings/types.jl") include("strings/search.jl") include("strings/util.jl") include("strings/io.jl") -end diff --git a/test/strings/basic.jl b/test/strings/basic.jl index 719556f259828..5a45192da28e8 100644 --- a/test/strings/basic.jl +++ b/test/strings/basic.jl @@ -1,6 +1,5 @@ # This file is a part of Julia. License is MIT: http://julialang.org/license -@testset "basic" begin # constructors let d = [0x61,0x62,0x63,0x21] @test String(d) == "abc!" @@ -479,4 +478,3 @@ foobaz(ch) = reinterpret(Char, typemax(UInt32)) @test_throws ArgumentError ascii("Hello, ∀") @test_throws ArgumentError ascii(GenericString("Hello, ∀")) -end diff --git a/test/strings/io.jl b/test/strings/io.jl index 0c3310860c0f0..a07662d1098f2 100644 --- a/test/strings/io.jl +++ b/test/strings/io.jl @@ -1,6 +1,5 @@ # This file is a part of Julia. License is MIT: http://julialang.org/license -@testset "io" begin # string escaping & unescaping cx = Any[ 0x00000000 '\0' "\\0" @@ -255,4 +254,3 @@ join(myio, "", "", 1) @test Base.unindent("\n\t\n \tfoo",4) == "\n \n foo" @test Base.unindent("\n\tfoo\tbar",4) == "\n foo bar" -end diff --git a/test/strings/search.jl b/test/strings/search.jl index 584d5d6655709..f06c8d4e70a0b 100644 --- a/test/strings/search.jl +++ b/test/strings/search.jl @@ -1,6 +1,5 @@ # This file is a part of Julia. License is MIT: http://julialang.org/license -@testset "search" begin # some test strings astr = "Hello, world.\n" u8str = "∀ ε > 0, ∃ δ > 0: |x-y| < δ ⇒ |f(x)-f(y)| < ε" @@ -375,4 +374,3 @@ end @test rsearchindex("\U1f596\U1f596", "\U1f596\U1f596") == 1 @test rsearchindex("\U1f596\U1f596", "\U1f596\U1f596", endof("\U1f596\U1f596\U1f596")) == 1 -end diff --git a/test/strings/types.jl b/test/strings/types.jl index b2fe8d4670c80..62de9746eb651 100644 --- a/test/strings/types.jl +++ b/test/strings/types.jl @@ -1,6 +1,5 @@ # This file is a part of Julia. License is MIT: http://julialang.org/license -@testset "types" begin ## SubString, RevString, RepString and Cstring tests ## ## SubString tests ## @@ -237,4 +236,3 @@ nullstr = Cstring(C_NULL) @test cstring != C_NULL @test C_NULL != cstring -end diff --git a/test/strings/util.jl b/test/strings/util.jl index 31fcb16945ba6..c1619c273abb0 100644 --- a/test/strings/util.jl +++ b/test/strings/util.jl @@ -1,6 +1,5 @@ # This file is a part of Julia. License is MIT: http://julialang.org/license -@testset "util" begin # padding (lpad and rpad) @test lpad("foo", 3) == "foo" @test rpad("foo", 3) == "foo" @@ -235,4 +234,3 @@ bin_val = hex2bytes("07bf") #non-hex characters @test_throws ArgumentError hex2bytes("0123456789abcdefABCDEFGH") -end diff --git a/test/subarray.jl b/test/subarray.jl index 4a34540f8d34a..03ddaaee1db45 100644 --- a/test/subarray.jl +++ b/test/subarray.jl @@ -1,6 +1,5 @@ # This file is a part of Julia. License is MIT: http://julialang.org/license -@testset "subarray" begin # import Base: ViewIndex, dimsizeexpr, rangetype, merge_indexes, first_index, stride1expr, tailsize using Base.Cartesian @@ -491,4 +490,3 @@ u = (1,2:3) let size=(x,y)-> error("should not happen") @test X[1:end,2,2] == @view X[1:end,2,2] end -end diff --git a/test/sysinfo.jl b/test/sysinfo.jl index c4fc4681853ec..645c34efce765 100644 --- a/test/sysinfo.jl +++ b/test/sysinfo.jl @@ -1,6 +1,5 @@ # This file is a part of Julia. License is MIT: http://julialang.org/license -@testset "sysinfo" begin # We can't guarantee that these are correct, but we can at least check # that they run @test length(Base.Sys.cpu_info()) > 0 @@ -38,5 +37,3 @@ key = randstring(25) @test !haskey(ENV,key) @test_throws KeyError ENV[key] @test get(ENV,key,"default") == "default" - -end diff --git a/test/test.jl b/test/test.jl index 1cc150196ec3c..0ef54e16b2f26 100644 --- a/test/test.jl +++ b/test/test.jl @@ -1,6 +1,5 @@ # This file is a part of Julia. License is MIT: http://julialang.org/license -@testset "test" begin # Test @test @test true @test 1 == 1 @@ -282,5 +281,3 @@ end # Issue #14928 # Make sure abstract error type works. @test_throws Exception error("") - -end diff --git a/test/testdefs.jl b/test/testdefs.jl index aff94fb56f52d..109c7d742bffa 100644 --- a/test/testdefs.jl +++ b/test/testdefs.jl @@ -4,7 +4,9 @@ using Base.Test function runtests(name) @printf(" \033[1m*\033[0m \033[31m%-21s\033[0m", name) - coolness = @timed include("$name.jl") + coolness = @timed @testset "$name" begin + include("$name.jl") + end #rss = Sys.maxrss() #@printf(" in %6.2f seconds, maxrss %7.2f MB\n", tt, rss / 2^20) #rss diff --git a/test/topology.jl b/test/topology.jl index 16cffa4c2dbf7..c2b421090ce52 100644 --- a/test/topology.jl +++ b/test/topology.jl @@ -1,6 +1,5 @@ # This file is a part of Julia. License is MIT: http://julialang.org/license -@testset "topology" begin include("testdefs.jl") addprocs(4; topology="master_slave") @test_throws RemoteException remotecall_fetch(()->remotecall_fetch(myid, 3), 2) @@ -86,4 +85,3 @@ for p1 in workers() end remove_workers_and_test() -end diff --git a/test/triplequote.jl b/test/triplequote.jl index f661625af4844..fe6b4134e443b 100644 --- a/test/triplequote.jl +++ b/test/triplequote.jl @@ -1,6 +1,5 @@ # This file is a part of Julia. License is MIT: http://julialang.org/license -@testset "triplequote" begin # triple-quote delimited strings @test """abc""" == "abc" @test """ab"c""" == "ab\"c" @@ -68,4 +67,3 @@ s = " p" $("\n ") """ == "\n $(nl)" -end diff --git a/test/tuple.jl b/test/tuple.jl index 6e91ae95fd883..e8b2b778a0b96 100644 --- a/test/tuple.jl +++ b/test/tuple.jl @@ -1,6 +1,4 @@ # This file is a part of Julia. License is MIT: http://julialang.org/license -@testset "tuple" begin - @testset "indexing" begin @test length(()) != 0 @test length((1,)) === 1 @@ -162,4 +160,3 @@ end # issue #12854 @test_throws TypeError ntuple(identity, Val{1:2}) -end diff --git a/test/unicode.jl b/test/unicode.jl index 2231402e3e817..21f3dd7d48fb4 100644 --- a/test/unicode.jl +++ b/test/unicode.jl @@ -1,6 +1,5 @@ # This file is a part of Julia. License is MIT: http://julialang.org/license -@testset "unicode" begin include("unicode/UnicodeError.jl") include("unicode/types.jl") include("unicode/checkstring.jl") @@ -8,4 +7,3 @@ include("unicode/utf8.jl") include("unicode/utf16.jl") include("unicode/utf32.jl") include("unicode/utf8proc.jl") -end diff --git a/test/unicode/UnicodeError.jl b/test/unicode/UnicodeError.jl index 2bea2153b3953..6ec6d0a936ec6 100644 --- a/test/unicode/UnicodeError.jl +++ b/test/unicode/UnicodeError.jl @@ -1,9 +1,7 @@ # This file is a part of Julia. License is MIT: http://julialang.org/license -@testset "unicodeerror" begin let io = IOBuffer() show(io, UnicodeError(Base.UTF_ERR_SHORT, 1, 10)) check = "UnicodeError: invalid UTF-8 sequence starting at index 1 (0xa missing one or more continuation bytes)" @test takebuf_string(io) == check end -end diff --git a/test/unicode/checkstring.jl b/test/unicode/checkstring.jl index ce1307d041b4f..289d4206bfd18 100644 --- a/test/unicode/checkstring.jl +++ b/test/unicode/checkstring.jl @@ -1,6 +1,5 @@ # This file is a part of Julia. License is MIT: http://julialang.org/license -@testset "checkstring" begin # 11575 # Test invalid sequences @@ -175,4 +174,3 @@ end @test_throws BoundsError Base.checkstring(b"abcdef", 3, 7) @test_throws ArgumentError Base.checkstring(b"abcdef", 3, 1) -end diff --git a/test/unicode/types.jl b/test/unicode/types.jl index 4f1a78dd97220..cc95c4b6aadd3 100644 --- a/test/unicode/types.jl +++ b/test/unicode/types.jl @@ -1,6 +1,5 @@ # This file is a part of Julia. License is MIT: http://julialang.org/license -@testset "types" begin nullstring16 = UInt16[] badstring16 = UInt16[0x0065] @test_throws UnicodeError UTF16String(nullstring16) @@ -11,4 +10,3 @@ badstring32 = UInt32['a'] @test_throws UnicodeError UTF32String(nullstring32) @test_throws UnicodeError UTF32String(badstring32) -end diff --git a/test/unicode/utf16.jl b/test/unicode/utf16.jl index f8e99908bc258..dffec6ebbc9ea 100644 --- a/test/unicode/utf16.jl +++ b/test/unicode/utf16.jl @@ -1,6 +1,5 @@ # This file is a part of Julia. License is MIT: http://julialang.org/license -@testset "UTF16" begin u8 = "\U10ffff\U1d565\U1d7f6\U00066\U2008a" u16 = utf16(u8) @test sizeof(u16) == 18 @@ -20,4 +19,3 @@ u16 = utf16(u8) @test convert(UTF16String, Int16[[0x65, 0x66] [0x67, 0x68]]) == "efgh" @test map(lowercase, utf16("TEST\U1f596")) == "test\U1f596" @test typeof(Base.unsafe_convert(Ptr{UInt16}, utf16("test"))) == Ptr{UInt16} -end diff --git a/test/unicode/utf32.jl b/test/unicode/utf32.jl index fb7cbb39f29ab..16b8dc34eb400 100644 --- a/test/unicode/utf32.jl +++ b/test/unicode/utf32.jl @@ -1,6 +1,5 @@ # This file is a part of Julia. License is MIT: http://julialang.org/license -@testset "UTF32" begin u8 = "\U10ffff\U1d565\U1d7f6\U00066\U2008a" u32 = utf32(u8) @test sizeof(u32) == 20 @@ -257,4 +256,3 @@ end @test isvalid(Char['f','o','o','b','a','r']) -end diff --git a/test/unicode/utf8.jl b/test/unicode/utf8.jl index 08ceab06b36a4..ea3cb83925711 100644 --- a/test/unicode/utf8.jl +++ b/test/unicode/utf8.jl @@ -1,6 +1,5 @@ # This file is a part of Julia. License is MIT: http://julialang.org/license -@testset "UTF8" begin ## Test for CESU-8 sequences let ch = 0x10000 @@ -43,4 +42,3 @@ end ## Specifically check UTF-8 string whose lead byte is same as a surrogate @test convert(String, b"\xed\x9f\xbf") == "\ud7ff" -end diff --git a/test/unicode/utf8proc.jl b/test/unicode/utf8proc.jl index 8b40bbc3c1d3e..1ecd4b35f5a80 100644 --- a/test/unicode/utf8proc.jl +++ b/test/unicode/utf8proc.jl @@ -1,6 +1,5 @@ # This file is a part of Julia. License is MIT: http://julialang.org/license -@testset "UTF8proc" begin # normalize_string (Unicode normalization etc.): @test normalize_string("\u006e\u0303", :NFC) == "\u00f1" @test "\u006e\u0303" == normalize_string("\u00f1", :NFD) @@ -300,4 +299,3 @@ let str = ascii("This is a test") check = "length-14 GraphemeIterator{String} for \"$str\"" @test takebuf_string(io) == check end -end diff --git a/test/vecelement.jl b/test/vecelement.jl index fb0c7d907f50a..d22984590bfbb 100644 --- a/test/vecelement.jl +++ b/test/vecelement.jl @@ -1,6 +1,5 @@ # This file is a part of Julia. License is MIT: http://julialang.org/license -@testset "vecelement" begin make_value{T<:Integer}(::Type{T}, i::Integer) = 3*i%T make_value{T<:AbstractFloat}(::Type{T},i::Integer) = T(3*i) @@ -64,5 +63,3 @@ a = Vector{Gr{2,Float64}}(2) a[2] = Gr(1.0, Bunch((VecElement(2.0), VecElement(3.0))), 4.0) a[1] = Gr(5.0, Bunch((VecElement(6.0), VecElement(7.0))), 8.0) @test a[2] == Gr(1.0, Bunch((VecElement(2.0), VecElement(3.0))), 4.0) - -end diff --git a/test/version.jl b/test/version.jl index 7c8ac9c21a16f..8f0bb9ec73a09 100644 --- a/test/version.jl +++ b/test/version.jl @@ -1,6 +1,5 @@ # This file is a part of Julia. License is MIT: http://julialang.org/license -@testset "version" begin # parsing tests @test v"2" == VersionNumber(2) @test v"3.2" == VersionNumber(3, 2) @@ -241,5 +240,3 @@ io = IOBuffer() @test VersionNumber(true, 0x2, Int128(3), (GenericString("rc"), 0x1)) == v"1.2.3-rc.1" @test VersionNumber(true, 0x2, Int128(3), (GenericString("rc"), 0x1)) == v"1.2.3-rc.1" @test VersionNumber(true, 0x2, Int128(3), (), (GenericString("sp"), 0x2)) == v"1.2.3+sp.2" - -end diff --git a/test/workspace.jl b/test/workspace.jl index 95b18beffa89c..f4d43c0b8dd18 100644 --- a/test/workspace.jl +++ b/test/workspace.jl @@ -1,6 +1,5 @@ # This file is a part of Julia. License is MIT: http://julialang.org/license -@testset "workspace" begin script = """ # Issue #11948 f(x) = x+1 @@ -16,5 +15,3 @@ show(io, Pair) """ exename = Base.julia_cmd() run(`$exename --startup-file=no -e $script`) - -end