Skip to content
This repository was archived by the owner on Jul 8, 2020. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions native/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,10 @@ test {
print "${result.successfulTestCount} successes, "
print "${result.failedTestCount} failures, "
println "${result.skippedTestCount} skipped)"

if(result.skippedTestCount > 0){
throw new RuntimeException("Tests cannot be skipped for wgpuj/native!");
}
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@

public class WgpuNativeTest {

private static final RustFailCallback callback = new RustFailCallback.RustFailCallbackImpl();

protected static WgpuTest wgpuTest;

static {
Expand All @@ -17,7 +19,7 @@ public class WgpuNativeTest {
wgpuTest = LibraryLoader.create(WgpuTest.class).load(file.getAbsolutePath());
WgpuJava.setRuntime(Runtime.getRuntime(wgpuTest));

wgpuTest.set_fail_callback(new RustFailCallback.RustFailCallbackImpl());
wgpuTest.set_fail_callback(callback);
}catch(Exception e){
System.err.println("Failed to initialize wgpu test library!");

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,6 @@
import com.noahcharlton.wgpuj.util.RustCString;
import jnr.ffi.Pointer;
import org.junit.jupiter.api.Assertions;
import org.junit.jupiter.api.Disabled;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.params.ParameterizedTest;
import org.junit.jupiter.params.provider.Arguments;
Expand Down Expand Up @@ -174,8 +173,8 @@ private static Stream<Arguments> getBindGroupEntryStringInputs() {
);
}

@Test
@Disabled("CLimits has private fields")
// --- Blocked by wgpu-native having a private field ---
// @Test
void cLimitsMaxBindGroupsTest() {
var cLimits = WgpuCLimits.createDirect();
cLimits.setMaxBindGroups(951);
Expand Down