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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
/// This macro calculates the levenshtein distance between 2 strings.
/// See: https://crates.io/crates/levenshtein
///
/// # Arguments
///
/// * `control: &String` - The string to compare against. This would be the real data from the data sample.</br>
/// * `experiment: &String` - The string to compare. This would be the generated data for which you want to find the distance.</br>
///
/// #Example
///
/// ```rust
/// # #[macro_use] extern crate test_data_generation; extern crate levenshtein;
/// # fn main() {
/// assert_eq!(levenshtein_distance!("kitten", "sitting"), 3 as usize);
/// # }
///
/// This macro generates a random number between 0 and 100.
/// Returns a f64.
///
/// # Example
///
/// ```rust
/// # #[macro_use] extern crate test_data_generation; extern crate rand;
/// # fn main() {
/// let rnd: f64 = random_percentage!();
/// println!("Your random number is {}", rnd);
/// # }
/// ```
/// This macro generates a random number for a given range.
/// Returns a u32.
///
/// # Arguments
///
/// * `a: u32` - The lowest number of the range to use for the random number.</br>
/// * `b: u32` - The highest number of the range to use for the random number.</br>
///
/// # Example
///
/// ```rust
/// # #[macro_use] extern crate test_data_generation; extern crate rand;
/// # fn main() {
/// let rnd: u32 = random_between!(0, 100);
/// println!("Your random number is {}", rnd);
/// # }
/// ```
/// This function calculates the percent difference between 2 strings.
///
/// # Arguments
///
/// * `control: &String` - The string to compare against. This would be the real data from the data sample.</br>
/// * `experiment: &String` - The string to compare. This would be the generated data for which you want to find the percent difference.</br>
///
/// # Example
///
/// ```rust
/// # #[macro_use] extern crate test_data_generation; extern crate levenshtein;
///
/// # fn main() {
/// assert_eq!(realistic_test!("kitten", "sitting"), 76.92307692307692 as f64);
/// # }
///