Macro test_data_generation::realistic_test [−][src]
macro_rules! realistic_test { ( $c:ident, $e:ident ) => { ... }; }
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.experiment: &String
- The string to compare. This would be the generated data for which you want to find the percent difference.
#Example
// let kitten = String::from("kitten"); // let sitting = String::from("sitting"); // assert_eq!(realistic_test!(&kitten, &sitting), 76.92307692307692 as f64);