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.180 tracks/lfe/exercises/binary/test/binary-string-tests.lfe
trackler-2.2.1.179 tracks/lfe/exercises/binary/test/binary-string-tests.lfe
trackler-2.2.1.178 tracks/lfe/exercises/binary/test/binary-string-tests.lfe
trackler-2.2.1.177 tracks/lfe/exercises/binary/test/binary-string-tests.lfe
trackler-2.2.1.176 tracks/lfe/exercises/binary/test/binary-string-tests.lfe
trackler-2.2.1.175 tracks/lfe/exercises/binary/test/binary-string-tests.lfe
trackler-2.2.1.174 tracks/lfe/exercises/binary/test/binary-string-tests.lfe
trackler-2.2.1.173 tracks/lfe/exercises/binary/test/binary-string-tests.lfe
trackler-2.2.1.172 tracks/lfe/exercises/binary/test/binary-string-tests.lfe
trackler-2.2.1.171 tracks/lfe/exercises/binary/test/binary-string-tests.lfe
trackler-2.2.1.170 tracks/lfe/exercises/binary/test/binary-string-tests.lfe
trackler-2.2.1.169 tracks/lfe/exercises/binary/test/binary-string-tests.lfe
trackler-2.2.1.167 tracks/lfe/exercises/binary/test/binary-string-tests.lfe
trackler-2.2.1.166 tracks/lfe/exercises/binary/test/binary-string-tests.lfe
trackler-2.2.1.165 tracks/lfe/exercises/binary/test/binary-string-tests.lfe
trackler-2.2.1.164 tracks/lfe/exercises/binary/test/binary-string-tests.lfe
trackler-2.2.1.163 tracks/lfe/exercises/binary/test/binary-string-tests.lfe
trackler-2.2.1.162 tracks/lfe/exercises/binary/test/binary-string-tests.lfe
trackler-2.2.1.161 tracks/lfe/exercises/binary/test/binary-string-tests.lfe
trackler-2.2.1.160 tracks/lfe/exercises/binary/test/binary-string-tests.lfe