<commit_before>require 'minitest/autorun'
require_relative 'anagram'

class AnagramTest < MiniTest::Unit::TestCase

  def test_no_matches
    detector = Anagram.new('diaper')
    assert_equal [], detector.match(%w(hello world zombies pants))
  end

  def test_detect_simple_anagram
    skip
    detector = Anagram.new('ba')
    anagrams = detector.match(['ab', 'abc', 'bac'])
    assert_equal ['ab'], anagrams
  end

  def test_detect_multiple_anagrams
    skip
    detector = Anagram.new('abc')
    anagrams = detector.match(['ab', 'abc', 'bac'])
    assert_equal ['abc', 'bac'], anagrams
  end

  def test_does_not_confuse_different_duplicates
    skip
    detector = Anagram.new('abb')
    assert_equal [], detector.match(['aab'])
  end

  def test_eliminate_anagrams_with_same_checksum
    skip
    detector = Anagram.new('abb')
    assert_equal [], detector.match(['aac'])
  end

  def test_detect_anagram
    skip
    detector = Anagram.new('listen')
    anagrams = detector.match %w(enlists google inlets banana)
    assert_equal ['inlets'], anagrams
  end

  def test_multiple_anagrams
    skip
    detector = Anagram.new('allergy')
    anagrams = detector.match %w(gallery ballerina regally clergy largely leading)
    assert_equal ['gallery', 'regally', 'largely'], anagrams
  end

  def test_anagrams_are_case_insensitive
    skip
    detector = Anagram.new('Orchestra')
    anagrams = detector.match %w(cashregister carthorse radishes)
    assert_equal ['carthorse'], anagrams
  end<commit_msg>created better examples for anagram<commit_after>require 'minitest/autorun'
require_relative 'anagram'

class AnagramTest < MiniTest::Unit::TestCase

  def test_no_matches
    detector = Anagram.new('diaper')
    assert_equal [], detector.match(%w(hello world zombies pants))
  end

  def test_detect_simple_anagram
    skip
    detector = Anagram.new('ant')
    anagrams = detector.match(['tan', 'stand', 'at'])
    assert_equal ['tan'], anagrams
  end

  def test_detect_multiple_anagrams
    skip
    detector = Anagram.new('master')
    anagrams = detector.match(['stream', 'pidgeon', 'maters'])
    assert_equal ['stream', 'maters'], anagrams
  end

  def test_does_not_confuse_different_duplicates
    skip
    detector = Anagram.new('galea')
    assert_equal [], detector.match(['eagle'])
  end

  def test_eliminate_anagrams_with_same_checksum
    skip
    detector = Anagram.new('mass')
    assert_equal [], detector.match(['last'])
  end

  def test_detect_anagram
    skip
    detector = Anagram.new('listen')
    anagrams = detector.match %w(enlists google inlets banana)
    assert_equal ['inlets'], anagrams
  end

  def test_multiple_anagrams
    skip
    detector = Anagram.new('allergy')
    anagrams = detector.match %w(gallery ballerina regally clergy largely leading)
    assert_equal ['gallery', 'regally', 'largely'], anagrams
  end

  def test_anagrams_are_case_insensitive
    skip
    detector = Anagram.new('Orchestra')
    anagrams = detector.match %w(cashregister carthorse radishes)
    assert_equal ['carthorse'], anagrams
  end
{'fraction_non_alphanumeric': 0.10900783289817233, 'fraction_numerical': 0.0, 'mean_word_length': 4.168634064080944, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6188468', 'n_tokens_mistral': 1012, 'n_tokens_neox': 1003, 'n_words': 219}