<commit_before>use "ponytest"

actor Main is TestList
  new create(env: Env) =>
    PonyTest(env, this)

  new make() =>
    None

  fun tag tests(test: PonyTest) =>
    test(_TestSquares)

class _TestSquares iso is UnitTest
  """
  Test Difference of Squares package
  """

  fun name(): String => "difference-of-squares/Squares"

  fun apply(h: TestHelper): TestResult =>
    h.expect_eq[U32](225, Squares(5).square_of_sums())
    h.expect_eq[U32](55, Squares(5).sum_of_squares())
    h.expect_eq[U32](170, Squares(5).difference())

    h.expect_eq[U32](3025, Squares(10).square_of_sums())
    h.expect_eq[U32](385, Squares(10).sum_of_squares())
    h.expect_eq[U32](2640, Squares(10).difference())

    h.expect_eq[U32](25502500, Squares(100).square_of_sums())
    h.expect_eq[U32](338350, Squares(100).sum_of_squares())
    h.expect_eq[U32](25164150, Squares(100).difference())<commit_msg>Make difference-of-squares compatible with pony 0.7.0<commit_after>use "ponytest"

actor Main is TestList
  new create(env: Env) =>
    PonyTest(env, this)

  new make() =>
    None

  fun tag tests(test: PonyTest) =>
    test(_TestSquares)

class iso _TestSquares is UnitTest
  """
  Test Difference of Squares package
  """

  fun name(): String => "difference-of-squares/Squares"

  fun apply(h: TestHelper) =>
    h.assert_eq[U32](225, Squares(5).square_of_sums())
    h.assert_eq[U32](55, Squares(5).sum_of_squares())
    h.assert_eq[U32](170, Squares(5).difference())

    h.assert_eq[U32](3025, Squares(10).square_of_sums())
    h.assert_eq[U32](385, Squares(10).sum_of_squares())
    h.assert_eq[U32](2640, Squares(10).difference())

    h.assert_eq[U32](25502500, Squares(100).square_of_sums())
    h.assert_eq[U32](338350, Squares(100).sum_of_squares())
    h.assert_eq[U32](25164150, Squares(100).difference())
{'fraction_non_alphanumeric': 0.1615214994487321, 'fraction_numerical': 0.08654906284454245, 'mean_word_length': 4.725552050473186, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 13, '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': '1677547', 'n_tokens_mistral': 848, 'n_tokens_neox': 706, 'n_words': 113}