Skip to content

Commit

Permalink
Fix test for new native init logic
Browse files Browse the repository at this point in the history
  • Loading branch information
LavenderSnek committed Jul 21, 2024
1 parent 33f530c commit 2507228
Showing 1 changed file with 3 additions and 4 deletions.
Original file line number Diff line number Diff line change
@@ -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;
Expand All @@ -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));
}
Expand Down

0 comments on commit 2507228

Please sign in to comment.