* Add julialang binary search sample * Add unit test * Add julialang selection sort sample * Change julia suffix to jl * Add recursion and quick sort with tests * add quick sort * Add hash table samples * Add BFS * Changed file names * Add dijkstras * Add Dijkstras test
25 lines
229 B
Julia
25 lines
229 B
Julia
using Test
|
|
using Suppressor
|
|
|
|
function countdown(i)
|
|
println(i)
|
|
if i <= 0
|
|
return
|
|
end
|
|
countdown(i-1)
|
|
end
|
|
|
|
result = @capture_out(countdown(10)) # return stdout result
|
|
@test result == "10
|
|
9
|
|
8
|
|
7
|
|
6
|
|
5
|
|
4
|
|
3
|
|
2
|
|
1
|
|
0
|
|
"
|