Attempt CI coverage report
timw4mail/rusty-numbers/pipeline/head There was a failure building this commit Details

This commit is contained in:
Timothy Warren 2020-02-20 11:35:04 -05:00
parent 35c99a3ba1
commit 38c2d93c0a
2 changed files with 12 additions and 1 deletions

11
Jenkinsfile vendored
View File

@ -15,5 +15,16 @@ pipeline {
sh "cargo test"
}
}
stage('Coverage') {
steps {
sh "cargo install cargo-tarpaulin"
sh "make coverage"
}
}
}
post {
always {
cobertura coberturaReportFile: '*/.xml'
}
}
}

View File

@ -30,7 +30,6 @@ pub struct Frac<T: Unsigned = usize> {
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<T: Unsigned = usize> {
/// // Whole numbers and fractions
/// frac!(1 1/2);
/// ```
#[macro_export]
macro_rules! frac {
($w:literal $n:literal / $d:literal) => {
frac!($w) + frac!($n / $d)