test_that("print.assembly", {
asm <- c(".intel_syntax noprefix", ".global main")
class(asm) <- "assembly"
expect_output(print(asm), paste(asm, collapse = "\n"))
})
test_that("index_of", {
vars <- var_map()
indices <- map_int(c("a", "b", "c", "b"), ~ index_of(., vars))
expect_equal(indices, c(1, 2, 3, 2))
})
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.