We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent c0453df commit 924b162Copy full SHA for 924b162
src/metadata.rs
@@ -82,3 +82,30 @@ pub struct MediaInfo {
82
pub creating_library: CreatingLibrary,
83
pub media: Media,
84
}
85
+
86
+#[test]
87
+fn test_duration_conversion_pad_with_zero_one_hour() {
88
+ let input = DurationSeconds {
89
+ duration_seconds: 7200.0,
90
+ };
91
92
+ assert_eq!(input.duration_human(), "02:00:00");
93
+}
94
95
96
+fn sample_from_test_file() {
97
98
+ duration_seconds: 149.316,
99
100
101
+ assert_eq!(input.duration_human(), "02:29");
102
103
104
105
+fn test_duration_conversion_pad_with_zero_no_hour() {
106
107
+ duration_seconds: 360.0,
108
109
110
+ assert_eq!(input.duration_human(), "06:00");
111
0 commit comments