Sha256: d275a735057accf612a24c4c34639369197fcdac534be131f2323d8d9ba29896

Contents?: true

Size: 1.62 KB

Versions: 396

Compression:

Stored size: 1.62 KB

Contents

#lang racket

(require "roman-numerals.rkt")

(module+ test
  (require rackunit rackunit/text-ui)

  (define suite
    (test-suite
     "Roman Numeral tests"

     (test-equal? "1"
                  (to-roman 1)
                  "I")

     (test-equal? "2"
                  (to-roman 2)
                  "II")

     (test-equal? "3"
                  (to-roman 3)
                  "III")

     (test-equal? "4"
                  (to-roman 4)
                  "IV")

     (test-equal? "5"
                  (to-roman 5)
                  "V")

     (test-equal? "6"
                  (to-roman 6)
                  "VI")

     (test-equal? "9"
                  (to-roman 9)
                  "IX")

     (test-equal? "27"
                  (to-roman 27)
                  "XXVII")

     (test-equal? "48"
                  (to-roman 48)
                  "XLVIII")

     (test-equal? "59"
                  (to-roman 59)
                  "LIX")

     (test-equal? "93"
                  (to-roman 93)
                  "XCIII")

     (test-equal? "141"
                  (to-roman 141)
                  "CXLI")

     (test-equal? "163"
                  (to-roman 163)
                  "CLXIII")

     (test-equal? "402"
                  (to-roman 402)
                  "CDII")

     (test-equal? "575"
                  (to-roman 575)
                  "DLXXV")

     (test-equal? "911"
                  (to-roman 911)
                  "CMXI")

     (test-equal? "1024"
                  (to-roman 1024)
                  "MXXIV")

     (test-equal? "3000"
                  (to-roman 3000)
                  "MMM")
     ))

  (run-tests suite))

Version data entries

396 entries across 396 versions & 1 rubygems

Version Path
trackler-2.2.1.180 tracks/racket/exercises/roman-numerals/roman-numerals-test.rkt
trackler-2.2.1.179 tracks/racket/exercises/roman-numerals/roman-numerals-test.rkt
trackler-2.2.1.178 tracks/racket/exercises/roman-numerals/roman-numerals-test.rkt
trackler-2.2.1.177 tracks/racket/exercises/roman-numerals/roman-numerals-test.rkt
trackler-2.2.1.176 tracks/racket/exercises/roman-numerals/roman-numerals-test.rkt
trackler-2.2.1.175 tracks/racket/exercises/roman-numerals/roman-numerals-test.rkt
trackler-2.2.1.174 tracks/racket/exercises/roman-numerals/roman-numerals-test.rkt
trackler-2.2.1.173 tracks/racket/exercises/roman-numerals/roman-numerals-test.rkt
trackler-2.2.1.172 tracks/racket/exercises/roman-numerals/roman-numerals-test.rkt
trackler-2.2.1.171 tracks/racket/exercises/roman-numerals/roman-numerals-test.rkt
trackler-2.2.1.170 tracks/racket/exercises/roman-numerals/roman-numerals-test.rkt
trackler-2.2.1.169 tracks/racket/exercises/roman-numerals/roman-numerals-test.rkt
trackler-2.2.1.167 tracks/racket/exercises/roman-numerals/roman-numerals-test.rkt
trackler-2.2.1.166 tracks/racket/exercises/roman-numerals/roman-numerals-test.rkt
trackler-2.2.1.165 tracks/racket/exercises/roman-numerals/roman-numerals-test.rkt
trackler-2.2.1.164 tracks/racket/exercises/roman-numerals/roman-numerals-test.rkt
trackler-2.2.1.163 tracks/racket/exercises/roman-numerals/roman-numerals-test.rkt
trackler-2.2.1.162 tracks/racket/exercises/roman-numerals/roman-numerals-test.rkt
trackler-2.2.1.161 tracks/racket/exercises/roman-numerals/roman-numerals-test.rkt
trackler-2.2.1.160 tracks/racket/exercises/roman-numerals/roman-numerals-test.rkt