Skip to content

Commit

Permalink
add test
Browse files Browse the repository at this point in the history
  • Loading branch information
co1emi11er2 committed Dec 4, 2024
1 parent bc090e5 commit f7a6407
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 2 deletions.
2 changes: 1 addition & 1 deletion Project.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name = "TestHandcalcFunctions"
uuid = "6ba57fb7-81df-4b24-8e8e-a3885b6fcae7"
authors = ["Cole Miller"]
version = "0.2.2"
version = "0.2.3"

[compat]
julia = "1.10"
Expand Down
12 changes: 11 additions & 1 deletion src/TestHandcalcFunctions.jl
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
module TestHandcalcFunctions


export calc_Ix, calc_Is, calc_Iy, area_rectangle, sym_function
export calc_Ix, calc_Iy, calc_Is, area_rectangle, sym_function

function calc_Ix(b, h)
Ix = b*h^3/12
Expand Down Expand Up @@ -61,6 +61,8 @@ function sym_function(x)
end

module SubA

sub_module_func(a, b) = c = a * b
module SubB
sub_module_func(a, b) = c = a + b
end
Expand Down Expand Up @@ -90,4 +92,12 @@ function calc_if_Is_2(b, h, type)
return I
end

function test_function_finder(a, b)
I = calc_Is(a, b)
c1 = SubA.sub_module_func(a, b)
c2 = SubA.SubB.sub_module_func(a, b)

return c1, c2
end

end
1 change: 1 addition & 0 deletions test/runtests.jl
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,5 @@ using Test
@test TestHandcalcFunctions.calc_if_Is_1(5, 15, :Ix) == 1406.25
@test TestHandcalcFunctions.calc_if_Is_2(5, 15, :Ix) == 1406.25
@test TestHandcalcFunctions.calc_if_Is_2(5, 15, :Iy) == 156.25
@test TestHandcalcFunctions.test_function_finder(5, 10) == (50, 15)
end

2 comments on commit f7a6407

@co1emi11er2
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@JuliaRegistrator register()

@JuliaRegistrator
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Registration pull request updated: JuliaRegistries/General/119524

Tip: Release Notes

Did you know you can add release notes too? Just add markdown formatted text underneath the comment after the text
"Release notes:" and it will be added to the registry PR, and if TagBot is installed it will also be added to the
release that TagBot creates. i.e.

@JuliaRegistrator register

Release notes:

## Breaking changes

- blah

To add them here just re-invoke and the PR will be updated.

Tagging

After the above pull request is merged, it is recommended that a tag is created on this repository for the registered package version.

This will be done automatically if the Julia TagBot GitHub Action is installed, or can be done manually through the github interface, or via:

git tag -a v0.2.3 -m "<description of version>" f7a6407c5ccc14f81388c1a427c070d8e83dfdb5
git push origin v0.2.3

Please sign in to comment.