Test hope_list:unique_preserve_order/1
authorSiraaj Khandkar <siraaj@khandkar.net>
Fri, 15 Aug 2014 02:54:13 +0000 (22:54 -0400)
committerSiraaj Khandkar <siraaj@khandkar.net>
Fri, 15 Aug 2014 02:54:13 +0000 (22:54 -0400)
test/hope_list_SUITE.erl [new file with mode: 0644]

diff --git a/test/hope_list_SUITE.erl b/test/hope_list_SUITE.erl
new file mode 100644 (file)
index 0000000..751157d
--- /dev/null
@@ -0,0 +1,45 @@
+-module(hope_list_SUITE).
+
+%% Callbacks
+-export(
+    [ all/0
+    , groups/0
+    ]).
+
+%% Test cases
+-export(
+    [ t_unique_preserve_order/1
+    ]).
+
+
+-define(GROUP , hope_list).
+
+
+%% ============================================================================
+%% Common Test callbacks
+%% ============================================================================
+
+all() ->
+    [{group, ?GROUP}].
+
+groups() ->
+    Tests =
+        [ t_unique_preserve_order
+        ],
+    Properties = [],
+    [{?GROUP, Properties, Tests}].
+
+
+%% =============================================================================
+%%  Test cases
+%% =============================================================================
+
+t_unique_preserve_order(_Cfg) ->
+    ListAGiven = [a, a, g, b, f, c, a, d, a, e, f, d],
+    ListBGiven = "australia",
+    ListAExpected = [a, g, b, f, c, d, e],
+    ListBExpected = "austrli",
+    ListAComputed = hope_list:unique_preserve_order(ListAGiven),
+    ListBComputed = hope_list:unique_preserve_order(ListBGiven),
+    ListAComputed = ListAExpected,
+    ListBComputed = ListBExpected.
This page took 0.027278 seconds and 4 git commands to generate.