Skip to content

Commit

Permalink
test: add basic tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Stefan Strömer committed Jun 1, 2024
1 parent 1dcd42e commit b7c7de0
Showing 1 changed file with 15 additions and 1 deletion.
16 changes: 15 additions & 1 deletion test/runtests.jl
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,19 @@ import JET
JET.test_package(IESoptLib; target_defined_modules=true)
end

# Write your tests here.
@testset "IESoptLib.jl (basic)" verbose = true begin
path_iesoptlib = abspath(dirname(pathof(IESoptLib)))

@test relpath(get_path(:addons), path_iesoptlib) == "addons"
@test relpath(get_path(:examples), path_iesoptlib) == "examples"
@test relpath(get_path(:templates), path_iesoptlib) == "templates"

@test_throws ArgumentError get_path(:other)

n = "01_basic_single_node"
@test get_filename(:example, n) == joinpath(get_path(:examples), "$(n).iesopt.yaml")
# TODO: test addons & templates

@test_throws ArgumentError get_filename(:other, n)
end
end

0 comments on commit b7c7de0

Please sign in to comment.