Mercurial > repos > public > sbplib_julia
diff test/testSbpOperators.jl @ 605:8fcf9c9afb30 refactor/toml_operator_format
Merge
author | Jonatan Werpers <jonatan@werpers.com> |
---|---|
date | Sat, 05 Dec 2020 13:58:43 +0100 |
parents | 6901d5375311 fbff4009c08a |
children | eaa8c852ddf2 |
line wrap: on
line diff
--- a/test/testSbpOperators.jl Sat Dec 05 13:51:11 2020 +0100 +++ b/test/testSbpOperators.jl Sat Dec 05 13:58:43 2020 +0100 @@ -20,6 +20,15 @@ @test SbpOperators.Stencil((1,2,3,4), center=4) == SbpOperators.Stencil((-3, 0),(1,2,3,4)) end +@testset "parse_rational" begin + @test SbpOperators.parse_rational("1") isa Rational + @test SbpOperators.parse_rational("1") == 1//1 + @test SbpOperators.parse_rational("1/2") isa Rational + @test SbpOperators.parse_rational("1/2") == 1//2 + @test SbpOperators.parse_rational("37/13") isa Rational + @test SbpOperators.parse_rational("37/13") == 37//13 +end + @testset "readoperator" begin toml_str = """ [meta]