Skip to content

Commit

Permalink
add simple sanity checks
Browse files Browse the repository at this point in the history
  • Loading branch information
vchuravy committed Jan 23, 2018
1 parent b6ae23c commit d7db0bf
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions test/ExecutionTests.jl
Original file line number Diff line number Diff line change
Expand Up @@ -184,4 +184,16 @@ let fname = tempname()
end
end

############
# cpu-time #
############

# some simple sanity checks
t = @benchmark sleep(1)
@test cputime(t) < 1e9
t = @benchmark sin(1)
if BenchmarkTools.Timers.ACCURATE_CPUTIME
@test cputime(t) > 5e8 # 50% cputime
end

end # module

0 comments on commit d7db0bf

Please sign in to comment.