Skip to content

Commit

Permalink
decoupled the Printf from Base
Browse files Browse the repository at this point in the history
  • Loading branch information
wookay committed Sep 21, 2019
1 parent 5225df0 commit b35a129
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
1 change: 1 addition & 0 deletions Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ version = "0.1.14"
Distributed = "8ba89e20-285c-5b6f-9357-94700520ee1b"
Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40"
FileWatching = "7b1f6079-737a-58dc-b8bc-7a2ca5c1b5ee"
Printf = "de0858da-6303-5e67-8744-51eddeeeb8d7"

[compat]
julia = "1.0.2"
8 changes: 5 additions & 3 deletions src/runtests.jl
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# module Jive

using Distributed # nprocs addprocs rmprocs
using Printf

function slash_to_path_separator(subpath::String)
sep = Base.Filesystem.path_separator
Expand Down Expand Up @@ -93,7 +94,7 @@ function report(io::IO, t0, anynonpass, n_passed)
print(io, "Test run finished with ")
print(io, anynonpass, " ")
print(io, anynonpass == 1 ? "error" : "errors", ".")
Base.Printf.@printf(io, " (%.2f seconds)\n", (time_ns()-t0)/1e9)
Printf.@printf(io, " (%.2f seconds)\n", (time_ns()-t0)/1e9)
throw(FinishedWithErrors())
elseif n_passed > 0
printstyled(io, "", color=:green)
Expand All @@ -102,7 +103,7 @@ function report(io::IO, t0, anynonpass, n_passed)
print(io, " ")
print(io, n_passed == 1 ? "test has" : "tests have")
print(io, " been completed.")
Base.Printf.@printf(io, " (%.2f seconds)\n", (time_ns()-t0)/1e9)
Printf.@printf(io, " (%.2f seconds)\n", (time_ns()-t0)/1e9)
end
end

Expand All @@ -121,6 +122,7 @@ module CodeFromStdlibTest

using Test: TESTSET_PRINT_ENABLE, DefaultTestSet, Error, TestSetException, Random, get_testset_depth, get_testset, record, pop_testset, parse_testset_args, _check_testset, push_testset, get_test_counts, filter_errors
using ..Jive: jive_briefing
using Printf

if VERSION >= v"1.3.0-DEV.565"
default_rng = Random.default_rng
Expand Down Expand Up @@ -161,7 +163,7 @@ function jive_print_counts(io::IO, ts::DefaultTestSet, elapsedtime)
print(io, repeat(' ', 4))
printstyled(io, "Pass", " "; bold=true, color=:green)
printstyled(io, np, color=:green)
Base.Printf.@printf(io, " (%.2f seconds)\n", elapsedtime)
Printf.@printf(io, " (%.2f seconds)\n", elapsedtime)
end
end

Expand Down

0 comments on commit b35a129

Please sign in to comment.