Files
omnibot/test/contrib/markov/chain_test.exs
Alek Ratzloff 6d503089e4 Add binary search to Util
For some reason there doesn't appear to be a binary search function in
Elixir's standard library, so this implements that.

Signed-off-by: Alek Ratzloff <alekratz@gmail.com>
2020-07-08 11:29:13 -07:00

13 lines
297 B
Elixir

defmodule MarkovChainTest do
use ExUnit.Case
alias Omnibot.Contrib.Markov.Chain
test "chain train_one works correctly" do
chain = %Chain {order: 2}
|> Chain.train_one(["foo", "bar"], "baz")
#assert chain.chain == [
#{["foo", "bar"], {"baz", 1}}
#]
end
end