<commit_before>defmodule BlanksTest do
  use ExUnit.Case, async: true

  test "simple replacement" do
    ast = quote do: 1 + ___

    mangled = Blanks.replace(ast, 37)
    assert {:+, [context: BlanksTest, import: Kernel], [1, 37]} == mangled
  end

  test "Work with multiple different replacements" do
    [koan | _] = SampleKoan.all_koans
    assert :ok == apply(SampleKoan, koan, [{:multiple, [3,4]}])
  end

  def complex_example do
    [head | tail] = [1,2,3,4]

    assert head == 1
    assert tail == [2,3,4]
  end

  def foo(answer) do
    if answer == :yes do
      :bar
    else
      :batz
    end
  end

  test "complex example" do
    ast = [do: {:assert, [line: 5], [{:==, [line: 5], [true, {:___, [], __MODULE__}]}]}]

    assert [do: {:assert, [line: 5], [{:==, [line: 5], [true, true]}]}] == Blanks.replace(ast, true)
  end

  test "multiple arguments" do
    ast = [do: {:assert, [line: 5], [{:==, [line: 5], [{:___, [], __MODULE__}, {:___, [], __MODULE__}]}]}]

    assert [do: {:assert, [line: 5], [{:==, [line: 5], [true, false]}]}] == Blanks.replace(ast, [true, false])
  end

  test "counts simple blanks" do
    ast = quote do: 1 + ___

    assert Blanks.count(ast) == 1
  end<commit_msg>Remove unused functions<commit_after>defmodule BlanksTest do
  use ExUnit.Case, async: true

  test "simple replacement" do
    ast = quote do: 1 + ___

    mangled = Blanks.replace(ast, 37)
    assert {:+, [context: BlanksTest, import: Kernel], [1, 37]} == mangled
  end

  test "Work with multiple different replacements" do
    [koan | _] = SampleKoan.all_koans
    assert :ok == apply(SampleKoan, koan, [{:multiple, [3,4]}])
  end

  test "complex example" do
    ast = [do: {:assert, [line: 5], [{:==, [line: 5], [true, {:___, [], __MODULE__}]}]}]

    assert [do: {:assert, [line: 5], [{:==, [line: 5], [true, true]}]}] == Blanks.replace(ast, true)
  end

  test "multiple arguments" do
    ast = [do: {:assert, [line: 5], [{:==, [line: 5], [{:___, [], __MODULE__}, {:___, [], __MODULE__}]}]}]

    assert [do: {:assert, [line: 5], [{:==, [line: 5], [true, false]}]}] == Blanks.replace(ast, [true, false])
  end

  test "counts simple blanks" do
    ast = quote do: 1 + ___

    assert Blanks.count(ast) == 1
  end
{'fraction_non_alphanumeric': 0.19964189794091317, 'fraction_numerical': 0.019695613249776187, 'mean_word_length': 3.3823529411764706, 'pattern_counts': {'":': 0, '<': 3, '<?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': '3786998', 'n_tokens_mistral': 886, 'n_tokens_neox': 805, 'n_words': 240}