Description Usage Arguments Details Examples
The output is called multiple times, and each time the output should be the same. Especially do it for the calls running native code, best for detecting buffer overflows, memory segfaults, and so on.
1 | multiple_expect(x.call, n = 5, use.gctorture = FALSE)
|
x.call |
a valid R call. |
n |
number of times. |
use.gctorture |
|
Although it's safer to check code with a memory management profiler like
Valgrind, the C
code can be called multiple times to check if any
garbage values are returned due to buffer overflow.
gctorture
makes R hundred times slower. Consider choosing sane
values for n
when use.gctorture
is TRUE
.
1 2 3 4 5 6 7 | ## Not run:
## this silently passes!
multiple_expect(cat('hi'), n = 5)
## Below will give error when no seed is set.
multiple_expect(rnorm(5), n = 5, use.gctorture = FALSE)
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.