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.119 tracks/erlang/exercises/anagram/test/anagram_tests.erl
trackler-2.2.1.118 tracks/erlang/exercises/anagram/test/anagram_tests.erl
trackler-2.2.1.117 tracks/erlang/exercises/anagram/test/anagram_tests.erl
trackler-2.2.1.116 tracks/erlang/exercises/anagram/test/anagram_tests.erl
trackler-2.2.1.115 tracks/erlang/exercises/anagram/test/anagram_tests.erl
trackler-2.2.1.114 tracks/erlang/exercises/anagram/test/anagram_tests.erl
trackler-2.2.1.113 tracks/erlang/exercises/anagram/test/anagram_tests.erl
trackler-2.2.1.111 tracks/erlang/exercises/anagram/test/anagram_tests.erl
trackler-2.2.1.110 tracks/erlang/exercises/anagram/test/anagram_tests.erl
trackler-2.2.1.109 tracks/erlang/exercises/anagram/test/anagram_tests.erl
trackler-2.2.1.108 tracks/erlang/exercises/anagram/test/anagram_tests.erl
trackler-2.2.1.107 tracks/erlang/exercises/anagram/test/anagram_tests.erl
trackler-2.2.1.106 tracks/erlang/exercises/anagram/test/anagram_tests.erl
trackler-2.2.1.105 tracks/erlang/exercises/anagram/test/anagram_tests.erl
trackler-2.2.1.104 tracks/erlang/exercises/anagram/test/anagram_tests.erl
trackler-2.2.1.103 tracks/erlang/exercises/anagram/test/anagram_tests.erl
trackler-2.2.1.102 tracks/erlang/exercises/anagram/test/anagram_tests.erl
trackler-2.2.1.101 tracks/erlang/exercises/anagram/test/anagram_tests.erl
trackler-2.2.1.100 tracks/erlang/exercises/anagram/test/anagram_tests.erl
trackler-2.2.1.99 tracks/erlang/exercises/anagram/test/anagram_tests.erl