Sha256: bd61915e46cb2c3b51a085f281ca7b336f3eab3d18375e23e1ba8c08abd78deb

Contents?: true

Size: 1 KB

Versions: 139

Compression:

Stored size: 1 KB

Contents

open Core.Std
open OUnit2
open Difference_of_squares

let ae exp got _test_ctxt = assert_equal exp got

let square_of_sum_tests = [
   "square of sum 5" >::
     ae 225 (square_of_sum 5);
   "square of sum 10" >::
     ae 3025 (square_of_sum 10);
   "square of sum 100" >::
     ae 25502500 (square_of_sum 100);
]

let sum_of_squares_tests = [
   "sum of squares 5" >::
     ae 55 (sum_of_squares 5);
   "sum of squares 10" >::
     ae 385 (sum_of_squares 10);
   "sum of squares 100" >::
     ae 338350 (sum_of_squares 100);
]

let difference_of_squares_tests = [
   "difference of squares 0" >::
     ae 0 (difference_of_squares 0);
   "difference of squares 5" >::
     ae 170 (difference_of_squares 5);
   "difference of squares 10" >::
     ae 2640 (difference_of_squares 10);
   "difference of squares 100" >::
     ae 25164150 (difference_of_squares 100);
]

let () =
  run_test_tt_main (
    "difference of squares tests" >:::
      List.concat [square_of_sum_tests; sum_of_squares_tests; difference_of_squares_tests]
  )

Version data entries

139 entries across 139 versions & 1 rubygems

Version Path
trackler-2.0.8.7 tracks/ocaml/exercises/difference-of-squares/test.ml
trackler-2.0.8.6 tracks/ocaml/exercises/difference-of-squares/test.ml
trackler-2.0.8.5 tracks/ocaml/exercises/difference-of-squares/test.ml
trackler-2.0.8.4 tracks/ocaml/exercises/difference-of-squares/test.ml
trackler-2.0.8.3 tracks/ocaml/exercises/difference-of-squares/test.ml
trackler-2.0.8.2 tracks/ocaml/exercises/difference-of-squares/test.ml
trackler-2.0.8.1 tracks/ocaml/exercises/difference-of-squares/test.ml
trackler-2.0.7.0 tracks/ocaml/exercises/difference-of-squares/test.ml
trackler-2.0.6.44 tracks/ocaml/exercises/difference-of-squares/test.ml
trackler-2.0.6.43 tracks/ocaml/exercises/difference-of-squares/test.ml
trackler-2.0.6.42 tracks/ocaml/exercises/difference-of-squares/test.ml
trackler-2.0.6.41 tracks/ocaml/exercises/difference-of-squares/test.ml
trackler-2.0.6.40 tracks/ocaml/exercises/difference-of-squares/test.ml
trackler-2.0.6.39 tracks/ocaml/exercises/difference-of-squares/test.ml
trackler-2.0.6.38 tracks/ocaml/exercises/difference-of-squares/test.ml
trackler-2.0.6.37 tracks/ocaml/exercises/difference-of-squares/test.ml
trackler-2.0.6.36 tracks/ocaml/exercises/difference-of-squares/test.ml
trackler-2.0.6.35 tracks/ocaml/exercises/difference-of-squares/test.ml
trackler-2.0.6.34 tracks/ocaml/exercises/difference-of-squares/test.ml
trackler-2.0.6.33 tracks/ocaml/exercises/difference-of-squares/test.ml