aboutsummaryrefslogtreecommitdiff
path: root/test/mkllst_test.exs
diff options
context:
space:
mode:
authorAlex Auvolat <alex@adnab.me>2018-07-03 15:42:17 +0200
committerAlex Auvolat <alex@adnab.me>2018-07-03 15:42:17 +0200
commit8f3009715ee9ccdd7ecb54fea1244a32a29b62c0 (patch)
tree416fb96c39effa4217864bb6a93243803ba8edba /test/mkllst_test.exs
downloadshard-8f3009715ee9ccdd7ecb54fea1244a32a29b62c0.tar.gz
shard-8f3009715ee9ccdd7ecb54fea1244a32a29b62c0.zip
Initialize shard repo with code from somewhere
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