Skip to content

Commit 7709422

Browse files
committed
try again
1 parent ea91acb commit 7709422

File tree

3 files changed

+9
-6
lines changed

3 files changed

+9
-6
lines changed

lib/actor_simulation/definition.ex

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -40,14 +40,14 @@ defmodule ActorSimulation.Definition do
4040
"""
4141
def match_message(definition, msg) do
4242
Enum.find_value(definition.on_match, fn {pattern, response} ->
43-
case pattern do
44-
^msg ->
43+
cond do
44+
pattern == msg ->
4545
{:matched, response}
4646

47-
_ when is_function(pattern, 1) ->
48-
if pattern.(msg), do: {:matched, response}, else: nil
47+
is_function(pattern, 1) and pattern.(msg) ->
48+
{:matched, response}
4949

50-
_ ->
50+
true ->
5151
nil
5252
end
5353
end)

mix.exs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,9 @@ defmodule GenServerVirtualTime.MixProject do
8080
# Testing (optional, for coverage reports)
8181
{:excoveralls, "~> 0.18", only: :test, runtime: false},
8282

83+
# JSON parsing for coverage reports
84+
{:jason, "~> 1.4", only: [:dev, :test], runtime: false},
85+
8386
# Mutation testing
8487
{:muzak, "~> 1.1", only: :test, runtime: false},
8588
{:exavier, "~> 0.3.0", only: :test, runtime: false},

test/termination_indicator_test.exs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,7 @@ defmodule TerminationIndicatorTest do
157157
end
158158

159159
# Helper to generate Mermaid HTML
160-
defp generate_mermaid_html(mermaid, title, opts \\ []) do
160+
defp generate_mermaid_html(mermaid, title, opts) do
161161
model_source = Keyword.get(opts, :model_source, "")
162162
description = Keyword.get(opts, :description, "")
163163

0 commit comments

Comments
 (0)