Skip to content

Commit 0765e34

Browse files
committed
Populate MyFirstPackage.jl, runtests.jl and add functions.jl
1 parent 4b6eda6 commit 0765e34

File tree

3 files changed

+16
-0
lines changed

3 files changed

+16
-0
lines changed

src/MyFirstPackage.jl

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
module MyFirstPackage
22

33
# Write your package code here.
4+
export multiply_xy, greet_the_world, greet_your_package_name
5+
include("functions.jl")
46

57
end

src/functions.jl

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
function greet_your_package_name()
2+
return "Hello MyFirstPackage!"
3+
end
4+
5+
function greet_the_world()
6+
return "Hello World!"
7+
end
8+
9+
function multiply_xy(x::Integer, y::Integer)
10+
return x * y
11+
end

test/runtests.jl

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,7 @@ using Test
33

44
@testset "MyFirstPackage.jl" begin
55
# Write your tests here.
6+
@test MyFirstPackage.greet_your_package_name() == "Hello MyFirstPackage!"
7+
@test MyFirstPackage.greet_the_world() == "Hello World!"
8+
@test MyFirstPackage.multiply_xy(5, 5) == 25
69
end

0 commit comments

Comments
 (0)