Skip to content

Commit 5cd2891

Browse files
test: add unit test for IconManager::supports_themes with empty manager (#29)
Add a unit test to verify that `IconManager::supports_themes` correctly returns `false` for any icon name when the manager is empty (initialized via `IconManager::new()`). This verifies the default behavior of the theme support mapping. Co-authored-by: google-labs-jules[bot] <161369871+google-labs-jules[bot]@users.noreply.github.com> Co-authored-by: bearice <270121+bearice@users.noreply.github.com>
1 parent 0846641 commit 5cd2891

1 file changed

Lines changed: 13 additions & 0 deletions

File tree

src/icon_manager.rs

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -251,3 +251,16 @@ impl Default for IconManager {
251251
Self::new()
252252
}
253253
}
254+
255+
#[cfg(test)]
256+
mod tests {
257+
use super::*;
258+
259+
#[test]
260+
fn test_supports_themes_empty_manager() {
261+
let manager = IconManager::new();
262+
assert!(!manager.supports_themes("cat"));
263+
assert!(!manager.supports_themes("parrot"));
264+
assert!(!manager.supports_themes(""));
265+
}
266+
}

0 commit comments

Comments
 (0)