Mercurial > repos > public > sbplib_julia
comparison test/SbpOperators/stencil_set_test.jl @ 1596:84dc3b9b449b feature/boundary_conditions
Add positivity properties (the borrowing capacity) of the D2 operators to the operator toml as well as methods to parse them
author | Vidar Stiernström <vidar.stiernstrom@gmail.com> |
---|---|
date | Sun, 26 May 2024 18:13:58 -0700 |
parents | 3bb94ce74697 |
children | 8315c456e3b4 |
comparison
equal
deleted
inserted
replaced
1595:611ae2308aa1 | 1596:84dc3b9b449b |
---|---|
150 @test_throws ArgumentError parse_tuple(toml["e1"]) | 150 @test_throws ArgumentError parse_tuple(toml["e1"]) |
151 @test_throws ArgumentError parse_tuple(toml["e2"]) | 151 @test_throws ArgumentError parse_tuple(toml["e2"]) |
152 @test_throws ArgumentError parse_tuple(toml["e3"]) | 152 @test_throws ArgumentError parse_tuple(toml["e3"]) |
153 @test_throws ArgumentError parse_tuple(toml["e4"]) | 153 @test_throws ArgumentError parse_tuple(toml["e4"]) |
154 end | 154 end |
155 | |
156 @testset "parse_named_tuple" begin | |
157 toml = TOML.parse(""" | |
158 NamedTuple = {a = "17/48", b = "0.2505765857"} | |
159 """) | |
160 @test parse_named_tuple(toml["NamedTuple"]) == (b = Rational(0.2505765857), a = 17//48) | |
161 end | |
162 | |
155 end | 163 end |
156 | 164 |
157 @testset "parse_rational" begin | 165 @testset "parse_rational" begin |
158 @test SbpOperators.parse_rational("1") isa Rational | 166 @test SbpOperators.parse_rational("1") isa Rational |
159 @test SbpOperators.parse_rational("1") == 1//1 | 167 @test SbpOperators.parse_rational("1") == 1//1 |