Sha256: db55f0d4d944e4bd161b52aee2b42ae41dab0750d32f586c75ee6a625fa4c16a

Contents?: true

Size: 779 Bytes

Versions: 330

Compression:

Stored size: 779 Bytes

Contents

use "ponytest"

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

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

class iso _TestSquares is UnitTest
  fun name(): String => "difference-of-squares/Squares"

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

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

    h.assert_eq[USize](25502500, Squares.square_of_sums(100))
    h.assert_eq[USize](338350, Squares.sum_of_squares(100))
    h.assert_eq[USize](25164150, Squares.difference(100))

Version data entries

330 entries across 330 versions & 1 rubygems

Version Path
trackler-2.0.6.20 tracks/pony/exercises/difference-of-squares/test.pony
trackler-2.0.6.19 tracks/pony/exercises/difference-of-squares/test.pony
trackler-2.0.6.18 tracks/pony/exercises/difference-of-squares/test.pony
trackler-2.0.6.17 tracks/pony/exercises/difference-of-squares/test.pony
trackler-2.0.6.16 tracks/pony/exercises/difference-of-squares/test.pony
trackler-2.0.6.15 tracks/pony/exercises/difference-of-squares/test.pony
trackler-2.0.6.14 tracks/pony/exercises/difference-of-squares/test.pony
trackler-2.0.6.13 tracks/pony/exercises/difference-of-squares/test.pony
trackler-2.0.6.12 tracks/pony/exercises/difference-of-squares/test.pony
trackler-2.0.6.11 tracks/pony/exercises/difference-of-squares/test.pony