theme.rs

449 B · rust · 16 lines

1use mrlycore::colors::LIGHT;2use mrlydemo::set_theme;3use mrlydemo::spiral::spiral_pixels;45#[test]6fn the_light_theme_paints_the_ground_white() {7    set_theme(false);8    let sheet = spiral_pixels("square", 61, 4, -2, 41, "prime", false, 180).unwrap();9    let centre = (90 * 180 + 90) * 4;10    let ground = LIGHT.ground;11    assert_eq!(12        sheet.rgba[centre..centre + 3],13        [ground.r, ground.g, ground.b]14    );15    set_theme(true);16}