From c6ec33d6e612168e14d77007915a4ea423c55a2e Mon Sep 17 00:00:00 2001 From: Alex Auvolat Date: Sat, 1 Sep 2018 16:06:23 +0200 Subject: Move everything to subdirectory --- shard/test/mkllst_test.exs | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 shard/test/mkllst_test.exs (limited to 'shard/test/mkllst_test.exs') diff --git a/shard/test/mkllst_test.exs b/shard/test/mkllst_test.exs new file mode 100644 index 0000000..68dacf3 --- /dev/null +++ b/shard/test/mkllst_test.exs @@ -0,0 +1,18 @@ +defmodule ShardTest.MklLst do + use ExUnit.Case + doctest Shard.Application + + test "merkle list" do + alias SData.MerkleList, as: ML + + mkl = ML.new(&SData.cmp_ts_str/2) + + {:ok, [], nil} = ML.read(mkl) + + mkl = ML.insert(mkl, {12, "aa, bb"}) + mkl = ML.insert_many(mkl, [{14, "qwerty"}, {8, "haha"}]) + mkl = ML.insert(mkl, {14, "qwerty"}) + {:ok, list, nil} = ML.read(mkl, nil, nil) + assert length(list) == 3 + end +end -- cgit v1.2.3