Sha256: 310ec62e2d2e8af9ddb14198e9760f38e3eeb87287df5f3e8a355b1ab46702b1

Contents?: true

Size: 508 Bytes

Versions: 396

Compression:

Stored size: 508 Bytes

Contents

(defmodule binary-string-tests
  (behaviour ltest-unit)
  (export all))

(include-lib "ltest/include/ltest-macros.lfe")

(deftest one (check "1"))

(deftest two (check "10"))

(deftest three (check "11"))

(deftest four (check "100"))

(deftest nine (check "1001"))

(deftest twenty-six (check "11010"))

(deftest large (check "10001101000"))

(deftest carrot (is-equal 0 (binary-string:to-decimal "carrot")))

(defun check (string)
  (is-equal (list_to_integer string 2) (binary-string:to-decimal string)))

Version data entries

396 entries across 396 versions & 1 rubygems

Version Path
trackler-2.2.1.98 tracks/lfe/exercises/binary/test/binary-string-tests.lfe
trackler-2.2.1.97 tracks/lfe/exercises/binary/test/binary-string-tests.lfe
trackler-2.2.1.96 tracks/lfe/exercises/binary/test/binary-string-tests.lfe
trackler-2.2.1.95 tracks/lfe/exercises/binary/test/binary-string-tests.lfe
trackler-2.2.1.94 tracks/lfe/exercises/binary/test/binary-string-tests.lfe
trackler-2.2.1.93 tracks/lfe/exercises/binary/test/binary-string-tests.lfe
trackler-2.2.1.92 tracks/lfe/exercises/binary/test/binary-string-tests.lfe
trackler-2.2.1.91 tracks/lfe/exercises/binary/test/binary-string-tests.lfe
trackler-2.2.1.90 tracks/lfe/exercises/binary/test/binary-string-tests.lfe
trackler-2.2.1.89 tracks/lfe/exercises/binary/test/binary-string-tests.lfe
trackler-2.2.1.88 tracks/lfe/exercises/binary/test/binary-string-tests.lfe
trackler-2.2.1.87 tracks/lfe/exercises/binary/test/binary-string-tests.lfe
trackler-2.2.1.86 tracks/lfe/exercises/binary/test/binary-string-tests.lfe
trackler-2.2.1.85 tracks/lfe/exercises/binary/test/binary-string-tests.lfe
trackler-2.2.1.84 tracks/lfe/exercises/binary/test/binary-string-tests.lfe
trackler-2.2.1.83 tracks/lfe/exercises/binary/test/binary-string-tests.lfe
trackler-2.2.1.82 tracks/lfe/exercises/binary/test/binary-string-tests.lfe
trackler-2.2.1.81 tracks/lfe/exercises/binary/test/binary-string-tests.lfe
trackler-2.2.1.80 tracks/lfe/exercises/binary/test/binary-string-tests.lfe
trackler-2.2.1.79 tracks/lfe/exercises/binary/test/binary-string-tests.lfe