mirror of
https://github.com/iluvcapra/bwavfile.git
synced 2025-12-31 08:50:44 +00:00
Added tests for Bext::default()
This commit is contained in:
2
Cargo.lock
generated
2
Cargo.lock
generated
@@ -57,7 +57,7 @@ checksum = "a3e2c3daef883ecc1b5d58c15adae93470a91d425f3532ba1695849656af3fc1"
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "bwavfile"
|
name = "bwavfile"
|
||||||
version = "2.0.1"
|
version = "2.1.0"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"byteorder",
|
"byteorder",
|
||||||
"chrono",
|
"chrono",
|
||||||
|
|||||||
17
src/bext.rs
17
src/bext.rs
@@ -92,7 +92,7 @@ impl Default for Bext {
|
|||||||
description: "".to_string(),
|
description: "".to_string(),
|
||||||
originator: "".to_string(),
|
originator: "".to_string(),
|
||||||
originator_reference: "".to_string(),
|
originator_reference: "".to_string(),
|
||||||
origination_date:now.date_naive().format("%Y-%m%-d").to_string(),
|
origination_date: now.date_naive().format("%Y-%m%-d").to_string(),
|
||||||
origination_time: now.time().format("%H:%M:%S").to_string(),
|
origination_time: now.time().format("%H:%M:%S").to_string(),
|
||||||
time_reference: 0,
|
time_reference: 0,
|
||||||
version: 0,
|
version: 0,
|
||||||
@@ -106,3 +106,18 @@ impl Default for Bext {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[cfg(test)]
|
||||||
|
mod tests {
|
||||||
|
use super::*;
|
||||||
|
|
||||||
|
#[test]
|
||||||
|
fn build_default() {
|
||||||
|
let d = Bext::default();
|
||||||
|
assert_eq!(d.description, "");
|
||||||
|
assert_eq!(d.originator, "");
|
||||||
|
assert_eq!(d.originator_reference, "");
|
||||||
|
assert_eq!(d.version, 0);
|
||||||
|
assert_eq!(d.time_reference, 0);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user