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.1.0.12 tracks/ocaml/exercises/difference-of-squares/test.ml
trackler-2.1.0.11 tracks/ocaml/exercises/difference-of-squares/test.ml
trackler-2.1.0.10 tracks/ocaml/exercises/difference-of-squares/test.ml
trackler-2.1.0.9 tracks/ocaml/exercises/difference-of-squares/test.ml
trackler-2.1.0.8 tracks/ocaml/exercises/difference-of-squares/test.ml
trackler-2.1.0.7 tracks/ocaml/exercises/difference-of-squares/test.ml
trackler-2.1.0.6 tracks/ocaml/exercises/difference-of-squares/test.ml
trackler-2.1.0.5 tracks/ocaml/exercises/difference-of-squares/test.ml
trackler-2.1.0.4 tracks/ocaml/exercises/difference-of-squares/test.ml
trackler-2.1.0.3 tracks/ocaml/exercises/difference-of-squares/test.ml
trackler-2.1.0.2 tracks/ocaml/exercises/difference-of-squares/test.ml
trackler-2.1.0.1 tracks/ocaml/exercises/difference-of-squares/test.ml
trackler-2.1.0.0 tracks/ocaml/exercises/difference-of-squares/test.ml
trackler-2.0.8.55 tracks/ocaml/exercises/difference-of-squares/test.ml
trackler-2.0.8.54 tracks/ocaml/exercises/difference-of-squares/test.ml
trackler-2.0.8.53 tracks/ocaml/exercises/difference-of-squares/test.ml
trackler-2.0.8.52 tracks/ocaml/exercises/difference-of-squares/test.ml
trackler-2.0.8.51 tracks/ocaml/exercises/difference-of-squares/test.ml
trackler-2.0.8.50 tracks/ocaml/exercises/difference-of-squares/test.ml
trackler-2.0.8.49 tracks/ocaml/exercises/difference-of-squares/test.ml