Sha256: 7ea1f85616d64aab1b82193ac54bc9ba187a3850240a9ea30e9a0fb310db66ce

Contents?: true

Size: 1.06 KB

Versions: 53

Compression:

Stored size: 1.06 KB

Contents

(ql:quickload "lisp-unit")

(defpackage #:scrabble-score-test
  (:use #:cl #:lisp-unit))

#-xlisp-test (load "scrabble-score")

(in-package #:scrabble-score-test)

(define-test no-word-has-zero-score
  (assert-equal 0 (scrabble-score:score-word "")))

(define-test whitespace-only-also-has-zero-score
  (assert-equal 0 (scrabble-score:score-word
                   (concatenate 'string '(#\Space #\Newline)))))

(define-test scores-small-word
  (assert-equal 1 (scrabble-score:score-word "a")))

(define-test is-case-insensitive
  (assert-equal 1 (scrabble-score:score-word "A")))

(define-test scores-a-slightly-bigger-word
  (assert-equal 2 (scrabble-score:score-word "at")))

(define-test scores-a-middle-of-the-road-word
  (assert-equal 6 (scrabble-score:score-word "street")))

(define-test scores-a-peculiar-word
  (assert-equal 22 (scrabble-score:score-word "quirky")))

(define-test scores-a-very-long-word
  (assert-equal 27 (scrabble-score:score-word "UNEXCLUSIVENESS")))

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

Version data entries

53 entries across 53 versions & 1 rubygems

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