Sha256: 75a268b14a45a762142873f098b37af941404ebfbb49ac1ee5b2caf68e7bfb7a

Contents?: true

Size: 981 Bytes

Versions: 150

Compression:

Stored size: 981 Bytes

Contents

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

open Core
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

150 entries across 150 versions & 1 rubygems

Version Path
trackler-2.2.1.109 tracks/ocaml/exercises/difference-of-squares/test.ml
trackler-2.2.1.108 tracks/ocaml/exercises/difference-of-squares/test.ml
trackler-2.2.1.107 tracks/ocaml/exercises/difference-of-squares/test.ml
trackler-2.2.1.106 tracks/ocaml/exercises/difference-of-squares/test.ml
trackler-2.2.1.105 tracks/ocaml/exercises/difference-of-squares/test.ml
trackler-2.2.1.104 tracks/ocaml/exercises/difference-of-squares/test.ml
trackler-2.2.1.103 tracks/ocaml/exercises/difference-of-squares/test.ml
trackler-2.2.1.102 tracks/ocaml/exercises/difference-of-squares/test.ml
trackler-2.2.1.101 tracks/ocaml/exercises/difference-of-squares/test.ml
trackler-2.2.1.100 tracks/ocaml/exercises/difference-of-squares/test.ml
trackler-2.2.1.99 tracks/ocaml/exercises/difference-of-squares/test.ml
trackler-2.2.1.98 tracks/ocaml/exercises/difference-of-squares/test.ml
trackler-2.2.1.97 tracks/ocaml/exercises/difference-of-squares/test.ml
trackler-2.2.1.96 tracks/ocaml/exercises/difference-of-squares/test.ml
trackler-2.2.1.95 tracks/ocaml/exercises/difference-of-squares/test.ml
trackler-2.2.1.94 tracks/ocaml/exercises/difference-of-squares/test.ml
trackler-2.2.1.93 tracks/ocaml/exercises/difference-of-squares/test.ml
trackler-2.2.1.92 tracks/ocaml/exercises/difference-of-squares/test.ml
trackler-2.2.1.91 tracks/ocaml/exercises/difference-of-squares/test.ml
trackler-2.2.1.90 tracks/ocaml/exercises/difference-of-squares/test.ml