From 034e408743d06e724cc2d5444dd9afbc77d3e118 Mon Sep 17 00:00:00 2001 From: Igor Demin Date: Tue, 26 Jan 2021 12:25:06 +0300 Subject: [PATCH] macOs. fix tests --- .../skiko/SkiaWindowPerformanceTest.kt | 8 +++++--- ...skiko_SkiaWindowTest_render_text_MacOS.png | Bin 1207 -> 1323 bytes 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/samples/SkijaInjectSample/src/test/kotlin/org/jetbrains/skiko/SkiaWindowPerformanceTest.kt b/samples/SkijaInjectSample/src/test/kotlin/org/jetbrains/skiko/SkiaWindowPerformanceTest.kt index ada6edcf8..3f452074a 100644 --- a/samples/SkijaInjectSample/src/test/kotlin/org/jetbrains/skiko/SkiaWindowPerformanceTest.kt +++ b/samples/SkijaInjectSample/src/test/kotlin/org/jetbrains/skiko/SkiaWindowPerformanceTest.kt @@ -4,6 +4,7 @@ import kotlinx.coroutines.* import kotlinx.coroutines.swing.Swing import org.jetbrains.skija.* import org.junit.Test +import java.awt.Point import java.awt.event.WindowEvent import java.util.* import javax.swing.JFrame @@ -69,7 +70,6 @@ native crash in SkiaWindowTest "render single window" } init { - setLocation(200,200) setSize(width, height) defaultCloseOperation = WindowConstants.DISPOSE_ON_CLOSE layer.renderer = object : SkiaRenderer { @@ -132,8 +132,10 @@ native crash in SkiaWindowTest "render single window" } } - val windows = (1..3).map { - TestWindow(width = 40, height = 20, frameCount = 300, deviatedTerminalCount = 10) + val windows = (1..3).map { index -> + TestWindow(width = 40, height = 20, frameCount = 300, deviatedTerminalCount = 10).apply { + location = Point((index + 1) * 200, 200) + } } delay(1000) windows.forEach(TestWindow::startCollect) diff --git a/samples/SkijaInjectSample/src/test/screenshots/org_jetbrains_skiko_SkiaWindowTest_render_text_MacOS.png b/samples/SkijaInjectSample/src/test/screenshots/org_jetbrains_skiko_SkiaWindowTest_render_text_MacOS.png index 9a5a4b18f8886da642c8576e4224c6eb18878b78..a1d9fe091220ff157351f6fa4b27cd6d378f3127 100644 GIT binary pat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