Sha256: 0403a4f80cdef0458afde24d4a521fb963dc3e9790e1a8e2abcce46ba1bc6e9e

Contents?: true

Size: 1.34 KB

Versions: 116

Compression:

Stored size: 1.34 KB

Contents

-module(anagram_tests).

-include_lib("erl_exercism/include/exercism.hrl").
-include_lib("eunit/include/eunit.hrl").

no_matches_test() ->
  ?assertEqual(
     [], anagram:find("diaper", ["hello", "world", "zombies", "pants"])).

detect_simple_anagram_test() ->
  ?assertEqual(
     ["tan"], anagram:find("ant", ["tan", "stand", "at"])).

does_not_confuse_different_duplicates_test() ->
  ?assertEqual(
     [], anagram:find("galea", ["eagle"])).

eliminate_anagram_subsets_test() ->
  ?assertEqual(
     [], anagram:find("good", ["dog", "goody"])).

detect_anagram_test() ->
  ?assertEqual(
     ["inlets"], anagram:find("listen", ["enlists", "google", "inlets", "banana"])).

multiple_anagrams_test() ->
  ?assertEqual(
     ["gallery", "regally", "largely"],
     anagram:find("allergy", ["gallery", "ballerina", "regally", "clergy", "largely", "leading"])).

case_insensitive_subject_test() ->
  ?assertEqual(
     ["carthorse"], anagram:find("Orchestra", ["cashregister", "carthorse", "radishes"])).

case_insensitive_candidate_test() ->
  ?assertEqual(
     ["Carthorse"], anagram:find("orchestra", ["cashregister", "Carthorse", "radishes"])).

does_not_detect_a_word_as_its_own_anagram_test() ->
  ?assertEqual(
     ["cron"], anagram:find("corn", ["corn", "dark", "Corn", "rank", "CORN", "cron", "park"])).

version_test() ->
  ?assertMatch(1, anagram:test_version()).

Version data entries

116 entries across 116 versions & 1 rubygems

Version Path
trackler-2.2.1.180 tracks/erlang/exercises/anagram/test/anagram_tests.erl
trackler-2.2.1.179 tracks/erlang/exercises/anagram/test/anagram_tests.erl
trackler-2.2.1.178 tracks/erlang/exercises/anagram/test/anagram_tests.erl
trackler-2.2.1.177 tracks/erlang/exercises/anagram/test/anagram_tests.erl
trackler-2.2.1.176 tracks/erlang/exercises/anagram/test/anagram_tests.erl
trackler-2.2.1.175 tracks/erlang/exercises/anagram/test/anagram_tests.erl
trackler-2.2.1.174 tracks/erlang/exercises/anagram/test/anagram_tests.erl
trackler-2.2.1.173 tracks/erlang/exercises/anagram/test/anagram_tests.erl
trackler-2.2.1.172 tracks/erlang/exercises/anagram/test/anagram_tests.erl
trackler-2.2.1.171 tracks/erlang/exercises/anagram/test/anagram_tests.erl
trackler-2.2.1.170 tracks/erlang/exercises/anagram/test/anagram_tests.erl
trackler-2.2.1.169 tracks/erlang/exercises/anagram/test/anagram_tests.erl
trackler-2.2.1.167 tracks/erlang/exercises/anagram/test/anagram_tests.erl
trackler-2.2.1.166 tracks/erlang/exercises/anagram/test/anagram_tests.erl
trackler-2.2.1.165 tracks/erlang/exercises/anagram/test/anagram_tests.erl
trackler-2.2.1.164 tracks/erlang/exercises/anagram/test/anagram_tests.erl
trackler-2.2.1.163 tracks/erlang/exercises/anagram/test/anagram_tests.erl
trackler-2.2.1.162 tracks/erlang/exercises/anagram/test/anagram_tests.erl
trackler-2.2.1.161 tracks/erlang/exercises/anagram/test/anagram_tests.erl
trackler-2.2.1.160 tracks/erlang/exercises/anagram/test/anagram_tests.erl