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

Changed function 'warn' to macro '@warn' in runtests.jl #31262

Merged
merged 1 commit into from
Mar 7, 2019
Merged
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
14 changes: 7 additions & 7 deletions stdlib/SHA/test/runtests.jl
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ for idx in 1:length(data)

if hash != answers[sha_func][idx]
print("\n")
warn(
@warn(
"""
For $(describe_hash(sha_types[sha_func])) expected:
$(answers[sha_func][idx])
Expand Down Expand Up @@ -165,7 +165,7 @@ for sha_idx in 1:length(sha_funcs)
hash = bytes2hex(SHA.digest!(ctx))
if hash != answers[sha_funcs[sha_idx]][end]
print("\n")
warn(
@warn(
"""
For $(describe_hash(sha_types[sha_funcs[sha_idx]])) expected:
$(answers[sha_funcs[sha_idx]][end-1])
Expand Down Expand Up @@ -206,7 +206,7 @@ for sha_idx in 1:length(sha_funcs)
hash = bytes2hex(SHA.digest!(ctx))
if hash != answers[sha_funcs[sha_idx]][end]
print("\n")
warn(
@warn(
"""
For $(describe_hash(sha_types[sha_funcs[sha_idx]])) expected:
$(answers[sha_funcs[sha_idx]][end-1])
Expand All @@ -233,7 +233,7 @@ for (key, msg, fun, hash) in (
digest = bytes2hex(fun(Vector(key), Vector(msg)))
if digest != hash
print("\n")
warn(
@warn(
"""
For $fun($(String(key)), $(String(msg))) expected:
$hash
Expand All @@ -257,7 +257,7 @@ for idx in 1:length(ctxs)
copy(ctxs[idx]())
catch
print("\n")
warn("Some weird copy error happened with $(ctxs[idx])")
@warn("Some weird copy error happened with $(ctxs[idx])")
nerrors += 1
end
VERBOSE && println("Done! [$(nerrors - nerrors_old) errors]")
Expand All @@ -266,7 +266,7 @@ for idx in 1:length(ctxs)
VERBOSE && print("Testing show function @ $(ctxs[idx]) ...")
if replstr(ctxs[idx]()) != shws[idx]
print("\n")
warn("Some weird show error happened with $(ctxs[idx])")
@warn("Some weird show error happened with $(ctxs[idx])")
nerrors += 1
end
VERBOSE && println("Done! [$(nerrors - nerrors_old) errors]")
Expand All @@ -286,7 +286,7 @@ for f in sha_funcs
end
rethrow()
end
warn("Non-UInt8 Arrays should fail")
@warn("Non-UInt8 Arrays should fail")
nerrors += 1
end

Expand Down