aboutsummaryrefslogblamecommitdiff
path: root/test/mkllst_test.exs
blob: 7d1fadfe279791b8073e4bb70adffde7846deabb (plain) (tree)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15














                                                                                  
defmodule ShardTest.MklLst do
  use ExUnit.Case
  doctest Shard.Application

  test "merkle list" do
    {:ok, pid} = GenServer.start(SData.MerkleList, &SData.MerkleList.cmp_ts_str/2)

    {:ok, list, rt} = GenServer.call(pid, {:read, nil, nil})
    assert list == []
    assert rt == nil

    GenServer.cast(pid, {:insert, {12, "aa, bb"}})
    GenServer.cast(pid, {:insert_many, [{14, "qwerty"}, {8, "haha"}]})
  end
end