Skip to content

Commit

Permalink
kittest of color test
Browse files Browse the repository at this point in the history
  • Loading branch information
emilk committed Dec 26, 2024
1 parent 9a403ef commit 56f7885
Show file tree
Hide file tree
Showing 7 changed files with 18 additions and 15 deletions.
9 changes: 6 additions & 3 deletions crates/egui_demo_lib/src/rendering_test.rs
Original file line number Diff line number Diff line change
Expand Up @@ -681,21 +681,24 @@ fn mul_color_gamma(left: Color32, right: Color32) -> Color32 {
#[cfg(test)]
mod tests {
use crate::ColorTest;
use egui::vec2;
use egui_kittest::kittest::Queryable as _;

#[test]
pub fn rendering_test() {
let mut errors = vec![];
for dpi in [1.0, 1.25, 1.5, 1.75, 1.6666667, 2.0] {
let mut color_test = ColorTest::default();
let mut harness = egui_kittest::Harness::builder()
.with_size(vec2(2000.0, 2000.0))
.with_pixels_per_point(dpi)
.build_ui(|ui| {
color_test.ui(ui);
});

//harness.set_size(harness.ctx.used_size());
{
// Expand color-test collapsing header
harness.get_by_label("Color test").click();
harness.run();
}

harness.fit_contents();

Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 56f7885

Please sign in to comment.