diff --git a/src/Playground.jl b/src/Playground.jl index c373e32..d82ac6a 100644 --- a/src/Playground.jl +++ b/src/Playground.jl @@ -4,4 +4,8 @@ export add_one include("add_one.jl") +export double + +include("double.jl") + end \ No newline at end of file diff --git a/src/double.jl b/src/double.jl new file mode 100644 index 0000000..eea54a4 --- /dev/null +++ b/src/double.jl @@ -0,0 +1,3 @@ +function double(x) + return 2 * x +end \ No newline at end of file diff --git a/test/runtests.jl b/test/runtests.jl index f7d4c58..9305eb0 100644 --- a/test/runtests.jl +++ b/test/runtests.jl @@ -5,4 +5,10 @@ using Playground @test add_one(1) == 2 @test add_one(0) == 1 @test add_one(-1) == 0 +end + +@testset "double" begin + @test double(1) == 2 + @test double(2) == 4 + @test double(-2) == -4 end \ No newline at end of file