~umgeher/utfs-core

4a10f9923e07e3e4e28c55082270887bef6f9fcb — Umgeher Torgersen 11 months ago d1919b7
testing new tl_set and tl_range
1 files changed, 4 insertions(+), 6 deletions(-)

M test/main_test.erl
M test/main_test.erl => test/main_test.erl +4 -6
@@ 20,9 20,7 @@ main_test() ->
    {ok, #{<<"name">> := null, <<"os">> := <<"openbsd">>}} = utfs_core:kv_get(?TFile, [<<"name">>, <<"os">>]).

tl_test() ->
    {ok, set} = utfs_core:tl_set(?TTimeline, <<"e2000">>, <<"test started!">>),
    {ok, set} = utfs_core:tl_set(?TTimeline, <<"e2001">>, <<"testing set">>),
    {ok, <<"testing set">>} = utfs_core:tl_get(?TTimeline, <<"e2001">>),
    {ok, <<"test started!">>} = utfs_core:tl_get(?TTimeline, <<"e2000">>),
    {ok, {set, Event}} = utfs_core:tl_add(?TTimeline, <<"append!">>),
    {ok, <<"append!">>} = utfs_core:tl_get(?TTimeline, Event).
    {ok, <<"_e2000">>} = utfs_core:tl_set(?TTimeline, 2000, <<"test started!">>),
    {ok, <<"_e2001">>} = utfs_core:tl_set(?TTimeline, 2001, <<"testing set">>),
    {ok, {tl, <<"test started!">>, _, _}} = utfs_core:tl_get(?TTimeline, <<"_e2000">>),
    {ok, {[<<"_e2000">>, <<"_e2001">>], _}} = utfs_core:tl_range(?TTimeline, <<"ts">>, {1000, 3000}).