add test code to NativeBindings.java

This commit is contained in:
2026-05-25 22:41:17 -03:00
parent ad9176d909
commit 560cce77e8
2 changed files with 48 additions and 3 deletions

View File

@@ -2,6 +2,7 @@
#include <iostream>
#include "neonucleus.h"
#include "ncomplib.h"
#include <jni.h>
#include "carbon.hpp"
@@ -161,7 +162,7 @@ JNIEXPORT jobject JNICALL Java_org_neoflock_NeoNucleus_NativeBindings_nn_1create
(JNIEnv * env, jclass, jobject universe, jstring address, jlong totalMemory, jlong maxComponents, jlong maxDevices) {
nn_Universe* nnUni = (nn_Universe*) Carbon::PointerBacked::GetPointer(env, universe);
NULLPTR_CHECK(nnUni, nn_Universe);
const char * addr = env->GetStringUTFChars(address, NULL);
// TODO: computer jni userdata lol
nn_Computer* computer = nn_createComputer(nnUni, NULL, addr, totalMemory, maxComponents, maxDevices);