<commit_before>require "test/unit"
require_relative "../lib/gf/root.rb"

class TestYagura < Test::Unit::TestCase
  def test_create_yagura_5_persons
    gf = GFLoad::Formation.new(:yagura => 5)
    gf.start
    assert_equal(5, gf.size)
    assert_equal(5, gf.total_weight)
    assert_equal(0.5, gf.max_load_weight)
  end
end<commit_msg>test yagura by 7, 9, and 21<commit_after>require "test/unit"
require_relative "../lib/gf/root.rb"

class TestYagura < Test::Unit::TestCase
  def test_create_yagura_5_persons
    gf = GFLoad::Formation.new(:yagura => 5, :print => :none)
    gf.start
    assert_equal(5, gf.size)
    assert_equal(5, gf.total_weight)
    assert_in_delta(0.5, gf.max_load_weight)
    assert_equal([5, 5, 0.5, 0.5, "2.2", 1, 0.5], gf.summary_a)
  end

  def test_create_yagura_7_persons
    gf = GFLoad::Formation.new(:yagura => 7, :print => :none)
    gf.start
    assert_equal(7, gf.size)
    assert_equal(7, gf.total_weight)
    assert_in_delta(0.5, gf.max_load_weight)
    assert_equal([7, 7, 0.5, 0.5, "2.1", 1, 0.5], gf.summary_a)
  end

  def test_create_yagura_9_persons
    gf = GFLoad::Formation.new(:yagura => 9, :print => :none)
    gf.start
    assert_equal(9, gf.size)
    assert_equal(9, gf.total_weight)
    assert_in_delta(0.7425, gf.max_load_weight)
    w = gf.max_load_weight
    assert_equal([9, 9, w, w, "1.2.1", 1, w], gf.summary_a)
  end

  def test_create_yagura_21_persons
    gf = GFLoad::Formation.new(:yagura => 21, :print => :none)
    gf.start
    assert_equal(21, gf.size)
    assert_equal(21, gf.total_weight)
    assert_in_delta(0.9908, gf.max_load_weight)
    w = gf.max_load_weight
    assert_equal([21, 21, w, w, "1.2.2", 1, w], gf.summary_a)
  end
end
{'fraction_non_alphanumeric': 0.14512338425381904, 'fraction_numerical': 0.04700352526439483, 'mean_word_length': 3.743732590529248, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 12, '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': '7088346', 'n_tokens_mistral': 782, 'n_tokens_neox': 733, 'n_words': 130}