-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix dam break with corrections (#235)
* Fix dam break with corrections * Add error check for `trixi_include` * Fix tests * Add test for `trixi_include` * Fix typo
- Loading branch information
1 parent
9bf1da6
commit 2769ebf
Showing
6 changed files
with
57 additions
and
7 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
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
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
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
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 |
---|---|---|
@@ -1 +1,3 @@ | ||
# `util.jl` is added here to avoid confusion with `test_util.jl` | ||
include("util.jl") | ||
include("initial_condition.jl") |
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,23 @@ | ||
@testset verbose=true "trixi_include" begin | ||
example = """ | ||
x = 4 | ||
""" | ||
|
||
filename = tempname() | ||
try | ||
open(filename, "w") do file | ||
write(file, example) | ||
end | ||
|
||
@test_nowarn trixi_include(filename) | ||
@test @isdefined x | ||
@test x == 4 | ||
|
||
@test_nowarn trixi_include(filename, x=7) | ||
@test x == 7 | ||
|
||
@test_throws "assignment y not found in expression" trixi_include(filename, y=3) | ||
finally | ||
rm(filename, force=true) | ||
end | ||
end |