Sha256: 77835e02168650baf3e61088f9784070dcd17ad2d39179efa3ccfdea34fc3349

Contents?: true

Size: 706 Bytes

Versions: 396

Compression:

Stored size: 706 Bytes

Contents

#lang racket/base

(require "perfect-numbers.rkt")

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

  (define suite
    (test-suite
     "perfect numbers tests"

     (test-equal? "no perfect numbers in 1 - 5"
                  (perfect-numbers 5)
                  '())

     (test-equal? "return one perfect number for range 1 - 6"
                  (perfect-numbers 6)
                  '(6))

     (test-equal? "return 3 perfect numbers for range 1 - 1000"
                  (perfect-numbers 1000)
                  '(6 28 496))

     (test-equal? "return 4 perfect numbers for range 1 - 10000"
                  (perfect-numbers 10000)
                  '(6 28 496 8128))))

  (run-tests suite))

Version data entries

396 entries across 396 versions & 1 rubygems

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