check_cpp_function_exported.Rd
This check function uses check_code with an advanced regex pattern.
check_cpp_function_exported(state, return_type, name, not_exported_msg = NULL)
state | A child state that focuses on the cpp portion of an exercise submission. |
---|---|
return_type | A character string denoting the return type of the function that should have been exported. |
name | A character string denoting name of the function that should have been exported. |
not_exported_msg | An optional character string with a message that is shown if the function was not exported properly. |
# NOT RUN { # Example solution cpp #includeusing namespace Rcpp ; // [[Rcpp::export]] int answer(){ return 42 ; } /*** R x <- answer() x */ # SCT ex() %>% check_cpp() %>% check_cpp_function_exported("int", "answer") # }