diff --git a/core/test/config_test.jl b/core/test/config_test.jl index 8f9cb3e8f..3eccac95a 100644 --- a/core/test/config_test.jl +++ b/core/test/config_test.jl @@ -78,12 +78,17 @@ end end @testitem "snake_case" begin + using Ribasim: NodeType @test Ribasim.snake_case("CamelCase") == "camel_case" @test Ribasim.snake_case("ABCdef") == "a_b_cdef" @test Ribasim.snake_case("snake_case") == "snake_case" - @test Ribasim.snake_case(:CamelCase) == :camel_case - @test Ribasim.snake_case(:ABCdef) == :a_b_cdef - @test Ribasim.snake_case(:snake_case) == :snake_case + @test Ribasim.snake_case(:CamelCase) === :camel_case + @test Ribasim.snake_case(:ABCdef) === :a_b_cdef + @test Ribasim.snake_case(:snake_case) === :snake_case + @test Ribasim.snake_case(NodeType.PidControl) === :pid_control + for nt in instances(NodeType.T) + @test Ribasim.snake_case(nt) isa Symbol + end end @testitem "camel_case" begin