# Author: Peter Carl -> RUnit port by Ben McCann ->
# -> tinytest port by Justin Shea
library(tinytest)
test_calcTxnAvgCost <- function() {
expect_equal(
blotter:::.calcTxnAvgCost(TxnValue = 99, TxnQty = 10),
9.9
)
}
test_calcTxnAvgCost()
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.