Skip to content

Commit

Permalink
Populate MyFirstPackage.jl, runtests.jl and add functions.jl
Browse files Browse the repository at this point in the history
  • Loading branch information
R0b0ty committed Jun 9, 2024
1 parent 4b6eda6 commit 0765e34
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/MyFirstPackage.jl
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
module MyFirstPackage

# Write your package code here.
export multiply_xy, greet_the_world, greet_your_package_name
include("functions.jl")

end
11 changes: 11 additions & 0 deletions src/functions.jl
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
function greet_your_package_name()
return "Hello MyFirstPackage!"
end

function greet_the_world()
return "Hello World!"
end

function multiply_xy(x::Integer, y::Integer)
return x * y
end
3 changes: 3 additions & 0 deletions test/runtests.jl
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,7 @@ using Test

@testset "MyFirstPackage.jl" begin
# Write your tests here.
@test MyFirstPackage.greet_your_package_name() == "Hello MyFirstPackage!"
@test MyFirstPackage.greet_the_world() == "Hello World!"
@test MyFirstPackage.multiply_xy(5, 5) == 25
end

0 comments on commit 0765e34

Please sign in to comment.