17 lines
467 B
Elixir
17 lines
467 B
Elixir
defmodule Scopes.CSysTest do
|
|
use ExUnit.Case, async: true
|
|
alias Scopes.Core.Actor
|
|
alias Scopes.CSys
|
|
|
|
describe "basic:" do
|
|
test "minimal-neural-net" do
|
|
this = self()
|
|
zero = Actor.create(CSys.neuron(
|
|
fn msg, _scope -> send(this, msg) end, {nil, [], this}))
|
|
Actor.send(zero, "Hello Zero!")
|
|
Actor.stop(zero)
|
|
assert_receive "Hello Zero!"
|
|
refute_received msg, "unhandled message(s): #{inspect msg}"
|
|
end
|
|
end
|
|
end
|