summaryrefslogtreecommitdiff
path: root/test/src
diff options
context:
space:
mode:
Diffstat (limited to 'test/src')
-rw-r--r--test/src/db.erl18
1 files changed, 18 insertions, 0 deletions
diff --git a/test/src/db.erl b/test/src/db.erl
new file mode 100644
index 0000000..8c90842
--- /dev/null
+++ b/test/src/db.erl
@@ -0,0 +1,18 @@
+%%% Copyright (c) 2014, NORDUnet A/S.
+%%% See LICENSE for licensing information.
+
+-module(db).
+-export([get_by_indices/3]).
+
+get_by_indices(Start, _End, _Options) when Start < 0 ->
+ [];
+get_by_indices(Start, End, _Options) ->
+ case Start =< End of
+ true ->
+ B = crypto:hash(sha256, <<"bar">>),
+ lists:map(fun (Index) ->
+ {Index, B, notfetched}
+ end, lists:seq(Start, End));
+ false ->
+ []
+ end.