## Not run:
# # Example 1
# a <- c(1, 2, 3, 4, 5, 6)
#
# # SCT option 1 to test if second and fourth element is ok:
# test_expression_result("a[c(2, 4)]")
#
# # SCT option 2
# ex() %>% check_expr("a[c(2, 4)]") %>% check_result() %>% check_equal()
#
# # Example 2
# my_fun <- function() { print('hello') }
#
# # SCT option 1 to test if my_fun() produces correct output:
# test_expression_output("my_fun()")
#
# # SCT option 2
# ex() %>% check_expr("my_fun()") %>% check_output() %>% check_equal()
# ## End(Not run)
Run the code above in your browser using DataLab