diff options
| author | William Hergès <william@herges.fr> | 2025-11-08 21:31:48 +0100 |
|---|---|---|
| committer | William Hergès <william@herges.fr> | 2025-11-08 21:31:48 +0100 |
| commit | aa1d984db18333d89b6bb2b1fa9852f85edba2de (patch) | |
| tree | 304ea07295475003c192ef4d587c615a597fb9d9 /test/elixir_math_parser_test.exs | |
| parent | 0c49df8a68d47b5c42e1d28b43111c341b540145 (diff) | |
feat(calc): strengthen reducing
Diffstat (limited to 'test/elixir_math_parser_test.exs')
| -rw-r--r-- | test/elixir_math_parser_test.exs | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/test/elixir_math_parser_test.exs b/test/elixir_math_parser_test.exs index 3ccfb94..c71ee79 100644 --- a/test/elixir_math_parser_test.exs +++ b/test/elixir_math_parser_test.exs @@ -39,25 +39,25 @@ defmodule ElixirMathParserTest do test "variable reference" do assert parse_and_eval(""" - :a = 3 - :b = 2 - :result = :a + :b - """) == %{a: 3, b: 2, result: 5} + :a = 3 + :b = 2 + :result = :a + :b + """) == %{a: 3, b: 2, result: 5} end test "variable update" do assert parse_and_eval(""" - :a = 3 - :b = 2 - :a = :a + :b - """) == %{a: 5, b: 2} + :a = 3 + :b = 2 + :a = :a + :b + """) == %{a: 5, b: 2} end test "variables with numbers in name" do assert parse_and_eval(""" - :a1 = 3 - :a2 = 2 - :b1 = :a1 + :a2 - """) == %{a1: 3, a2: 2, b1: 5} + :a1 = 3 + :a2 = 2 + :b1 = :a1 + :a2 + """) == %{a1: 3, a2: 2, b1: 5} end end |
