-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
6c32dc1
commit 132f282
Showing
1 changed file
with
26 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
# Tests for IOExample | ||
@testset "IOExample Tests" begin | ||
input_dict = Dict(:var1 => 42, :var2 => "value") | ||
output_value = "test output" | ||
io_example = IOExample(input_dict, output_value) | ||
|
||
@test io_example.in == input_dict | ||
@test io_example.out == output_value | ||
end | ||
|
||
# Tests for Problem | ||
@testset "Problem Tests" begin | ||
# Create a vector of IOExample instances as specification | ||
spec = [IOExample(Dict(:var1 => 1, :var2 => 2), 3), IOExample(Dict(:var1 => 4, :var2 => 5), 6)] | ||
|
||
# Test constructor without a name | ||
problem1 = Problem(spec) | ||
@test problem1.name == "" | ||
@test problem1.spec === spec | ||
|
||
# Test constructor with a name | ||
problem_name = "Test Problem" | ||
problem2 = Problem(problem_name, spec) | ||
@test problem2.name == problem_name | ||
@test problem2.spec === spec | ||
end |
132f282
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@JuliaRegistrator register()
132f282
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Registration pull request created: JuliaRegistries/General/99306
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.
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: