Sha256: bb6e2c7ef658d2b491f5e1ca22a0b64d8d8bae3b43589422c1d98818555bdc05

Contents?: true

Size: 971 Bytes

Versions: 68

Compression:

Stored size: 971 Bytes

Contents

(* Test/exercise version: "1.2.0" *)

open OUnit2
open Difference_of_squares

let ae exp got _test_ctxt = assert_equal exp got

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


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


let difference_of_squares_tests = [
   "difference of squares 1" >::
     ae 0 (difference_of_squares 1);
   "difference of squares 5" >::
     ae 170 (difference_of_squares 5);
   "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

68 entries across 68 versions & 1 rubygems

Version Path
trackler-2.2.1.159 tracks/ocaml/exercises/difference-of-squares/test.ml
trackler-2.2.1.158 tracks/ocaml/exercises/difference-of-squares/test.ml
trackler-2.2.1.157 tracks/ocaml/exercises/difference-of-squares/test.ml
trackler-2.2.1.156 tracks/ocaml/exercises/difference-of-squares/test.ml
trackler-2.2.1.155 tracks/ocaml/exercises/difference-of-squares/test.ml
trackler-2.2.1.154 tracks/ocaml/exercises/difference-of-squares/test.ml
trackler-2.2.1.153 tracks/ocaml/exercises/difference-of-squares/test.ml
trackler-2.2.1.152 tracks/ocaml/exercises/difference-of-squares/test.ml
trackler-2.2.1.151 tracks/ocaml/exercises/difference-of-squares/test.ml
trackler-2.2.1.150 tracks/ocaml/exercises/difference-of-squares/test.ml
trackler-2.2.1.149 tracks/ocaml/exercises/difference-of-squares/test.ml
trackler-2.2.1.148 tracks/ocaml/exercises/difference-of-squares/test.ml
trackler-2.2.1.147 tracks/ocaml/exercises/difference-of-squares/test.ml
trackler-2.2.1.146 tracks/ocaml/exercises/difference-of-squares/test.ml
trackler-2.2.1.145 tracks/ocaml/exercises/difference-of-squares/test.ml
trackler-2.2.1.144 tracks/ocaml/exercises/difference-of-squares/test.ml
trackler-2.2.1.143 tracks/ocaml/exercises/difference-of-squares/test.ml
trackler-2.2.1.142 tracks/ocaml/exercises/difference-of-squares/test.ml
trackler-2.2.1.141 tracks/ocaml/exercises/difference-of-squares/test.ml
trackler-2.2.1.140 tracks/ocaml/exercises/difference-of-squares/test.ml