Sha256: a3b7fc54b37c9dbd1fa317685cabd0af9d46765b3d7b1b05c74c35aa3d87256c

Contents?: true

Size: 1016 Bytes

Versions: 53

Compression:

Stored size: 1016 Bytes

Contents

(ql:quickload "lisp-unit")

(defpackage #:squares-test
  (:use #:cl #:lisp-unit))

#-xlisp-test (load "squares")

(in-package #:squares-test)

(define-test square-of-sums-to-5
  (assert-equal 225 (squares:square-of-sums 5)))
(define-test sum-of-squares-to-5
  (assert-equal 55 (squares:sum-of-squares 5)))
(define-test difference-of-sums-to-5
  (assert-equal 170 (squares:difference 5)))

(define-test square-of-sums-to-10
  (assert-equal 3025 (squares:square-of-sums 10)))
(define-test sum-of-squares-to-10
  (assert-equal 385 (squares:sum-of-squares 10)))
(define-test difference-of-sums-to-10
  (assert-equal 2640 (squares:difference 10)))

(define-test square-of-sums-to-100
  (assert-equal 25502500 (squares:square-of-sums 100)))
(define-test sum-of-squares-to-100
  (assert-equal 338350 (squares:sum-of-squares 100)))
(define-test difference-of-sums-to-100
  (assert-equal 25164150 (squares:difference 100)))

#-xlisp-test
(let ((*print-errors* t)
      (*print-failures* t))
  (run-tests :all :squares-test))

Version data entries

53 entries across 53 versions & 1 rubygems

Version Path
trackler-2.0.5.16 tracks/lisp/exercises/difference-of-squares/difference-of-squares-test.lisp
trackler-2.0.5.15 tracks/lisp/exercises/difference-of-squares/difference-of-squares-test.lisp
trackler-2.0.5.14 tracks/lisp/exercises/difference-of-squares/difference-of-squares-test.lisp
trackler-2.0.5.13 tracks/lisp/exercises/difference-of-squares/difference-of-squares-test.lisp
trackler-2.0.5.12 tracks/lisp/exercises/difference-of-squares/difference-of-squares-test.lisp
trackler-2.0.5.11 tracks/lisp/exercises/difference-of-squares/difference-of-squares-test.lisp
trackler-2.0.5.10 tracks/lisp/exercises/difference-of-squares/difference-of-squares-test.lisp
trackler-2.0.5.9 tracks/lisp/exercises/difference-of-squares/difference-of-squares-test.lisp
trackler-2.0.5.8 tracks/lisp/exercises/difference-of-squares/difference-of-squares-test.lisp
trackler-2.0.5.7 tracks/lisp/exercises/difference-of-squares/difference-of-squares-test.lisp
trackler-2.0.5.6 tracks/lisp/exercises/difference-of-squares/difference-of-squares-test.lisp
trackler-2.0.5.5 tracks/lisp/exercises/difference-of-squares/difference-of-squares-test.lisp
trackler-2.0.5.4 tracks/lisp/exercises/difference-of-squares/difference-of-squares-test.lisp
trackler-2.0.5.3 tracks/lisp/exercises/difference-of-squares/difference-of-squares-test.lisp
trackler-2.0.5.2 tracks/lisp/exercises/difference-of-squares/difference-of-squares-test.lisp
trackler-2.0.5.1 tracks/lisp/exercises/difference-of-squares/difference-of-squares-test.lisp
trackler-2.0.5.0 tracks/lisp/exercises/difference-of-squares/difference-of-squares-test.lisp
trackler-2.0.4.0 tracks/lisp/exercises/difference-of-squares/difference-of-squares-test.lisp
trackler-2.0.3.9 tracks/lisp/exercises/difference-of-squares/difference-of-squares-test.lisp
trackler-2.0.3.8 tracks/lisp/exercises/difference-of-squares/difference-of-squares-test.lisp