tests/testthat/test_hex.R

library(argoFloats)

context("hex to bits")

test_that("hex to bits", {
    expect_equal(hexToBits('2'), c(0, 1, 0, 0))
    expect_equal(hexToBits('e'), c(0, 1, 1, 1))
    expect_equal(hexToBits('4000'), c(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0))
})

Try the argoFloats package in your browser

Any scripts or data that you put into this service are public.

argoFloats documentation built on Oct. 18, 2023, 1:06 a.m.