From 2507228a31d976710b4034a67b1ecb79d291f761 Mon Sep 17 00:00:00 2001 From: snek Date: Sat, 20 Jul 2024 07:33:14 -0700 Subject: [PATCH] Fix test for new native init logic --- .../com/group_finity/mascot/image/ImagePairLoaderTest.java | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/test/java/com/group_finity/mascot/image/ImagePairLoaderTest.java b/src/test/java/com/group_finity/mascot/image/ImagePairLoaderTest.java index f8350a8..2284fa4 100644 --- a/src/test/java/com/group_finity/mascot/image/ImagePairLoaderTest.java +++ b/src/test/java/com/group_finity/mascot/image/ImagePairLoaderTest.java @@ -1,5 +1,7 @@ package com.group_finity.mascot.image; +import com.group_finity.mascot.NativeFactory; +import com.group_finity.mascotapp.Constants; import org.junit.jupiter.api.BeforeAll; import org.junit.jupiter.api.Test; import org.junit.jupiter.api.io.TempDir; @@ -16,15 +18,12 @@ class ImagePairLoaderTest { private static final String IMG_NAME = "/red-blue.png"; private static final String IMG_RIGHT_NAME = "/red-blue-r.png"; // half the height of left image - static { - System.setProperty("com.group_finity.mascotnative", "generic"); // speeds it up - } - @TempDir static Path BASE; @BeforeAll static void setUpDir() throws IOException { + NativeFactory.init("generic", Constants.NATIVE_LIB_DIR); Files.copy(Path.of("src/test/resources", IMG_NAME), Path.of(BASE.toString(), IMG_NAME)); Files.copy(Path.of("src/test/resources", IMG_RIGHT_NAME), Path.of(BASE.toString(), IMG_RIGHT_NAME)); }