aboutsummaryrefslogtreecommitdiff
path: root/test/mkllst_test.exs
diff options
context:
space:
mode:
Diffstat (limited to 'test/mkllst_test.exs')
-rw-r--r--test/mkllst_test.exs15
1 files changed, 15 insertions, 0 deletions
diff --git a/test/mkllst_test.exs b/test/mkllst_test.exs
new file mode 100644
index 0000000..7d1fadf
--- /dev/null
+++ b/test/mkllst_test.exs
@@ -0,0 +1,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