1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
//! Tests the ability to use R to generate random numbers.
//!
//! The `extendr` attribute macro now has a `use_rng` argument.
//! If this is used, then a `GetRNGstate()` is invoked before the function is called,
//! and a `PutRNGstate()` is invoked after, even if said method panics.
//!
//! These tests has to check two things:
//!
//! * That the seed is set and affects the sampling functions on the rust-side
//! in the same way, as on the r-side.
//! * That the resulting sampled vector is not equal 0, as it would be that
//! if `GetRNGstate()` is not called prior to sampling.
//!
//!
use *;