diff --git a/Jenkinsfile b/Jenkinsfile index a99de90..1f11da4 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -15,5 +15,16 @@ pipeline { sh "cargo test" } } + stage('Coverage') { + steps { + sh "cargo install cargo-tarpaulin" + sh "make coverage" + } + } + } + post { + always { + cobertura coberturaReportFile: '*/.xml' + } } } \ No newline at end of file diff --git a/src/rational.rs b/src/rational.rs index d108427..613374b 100644 --- a/src/rational.rs +++ b/src/rational.rs @@ -30,7 +30,6 @@ pub struct Frac { sign: Sign, } -#[macro_export] /// Create a [Frac](rational/struct.Frac.html) type with signed or unsigned number literals /// /// Example: @@ -49,6 +48,7 @@ pub struct Frac { /// // Whole numbers and fractions /// frac!(1 1/2); /// ``` +#[macro_export] macro_rules! frac { ($w:literal $n:literal / $d:literal) => { frac!($w) + frac!($n / $d)