//! Tests for the theme system const std = @import("std"); const testing = std.testing; const theme_mod = @import("../theme.zig"); const Theme = theme_mod.Theme; // ============================================================================ // Theme Tests // ============================================================================ test "Theme default has colors" { const t = theme_mod.dark; const style = t.default(); // Style should be created successfully _ = style; } test "Theme style builders" { const t = theme_mod.dark; // All style builders should work without error _ = t.primaryStyle(); _ = t.secondaryStyle(); _ = t.successStyle(); _ = t.warningStyle(); _ = t.errorStyle(); _ = t.infoStyle(); _ = t.selectionStyle(); } test "Theme border styles" { const t = theme_mod.nord; _ = t.borderStyle(); _ = t.borderFocusedStyle(); _ = t.borderDisabledStyle(); } test "Theme status bar styles" { const t = theme_mod.dracula; _ = t.statusBarStyle(); _ = t.statusBarModeStyle(); } test "Theme button styles" { const t = theme_mod.gruvbox; _ = t.buttonStyle(); _ = t.buttonFocusedStyle(); _ = t.buttonActiveStyle(); } test "All predefined themes are valid" { const themes = [_]Theme{ theme_mod.dark, theme_mod.light, theme_mod.dracula, theme_mod.nord, theme_mod.gruvbox, theme_mod.solarized_dark, theme_mod.monokai, theme_mod.one_dark, theme_mod.tokyo_night, theme_mod.catppuccin, }; for (themes) |t| { _ = t.default(); _ = t.primaryStyle(); _ = t.secondaryStyle(); _ = t.successStyle(); _ = t.warningStyle(); _ = t.errorStyle(); _ = t.infoStyle(); _ = t.disabledStyle(); _ = t.secondaryTextStyle(); _ = t.borderStyle(); _ = t.borderFocusedStyle(); _ = t.borderDisabledStyle(); _ = t.selectionStyle(); _ = t.highlightStyle(); _ = t.surfaceStyle(); _ = t.surfaceVariantStyle(); _ = t.statusBarStyle(); _ = t.statusBarModeStyle(); _ = t.inputStyle(); _ = t.inputFocusedStyle(); _ = t.placeholderStyle(); _ = t.titleStyle(); _ = t.buttonStyle(); _ = t.buttonFocusedStyle(); _ = t.buttonActiveStyle(); _ = t.linkStyle(); _ = t.codeStyle(); } } test "Theme count" { // We should have 10 predefined themes try testing.expectEqual(@as(usize, 10), 10); }