tests/testthat/test-basic_function_symbol.R

context("Function Symbol")

test_that("Function works", {
    f <- Function("f")
    expect_true(get_type(f("x")) == "FunctionSymbol")
})

test_that("FunctionSymbol works", {
    f <- Function("f")
    f_x <- FunctionSymbol("f", c("x"))
    expect_true(f_x == f("x"))
    expect_true(f_x == S("f(x)"))
})

Try the symengine package in your browser

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

symengine documentation built on Oct. 23, 2022, 5:06 p.m.