From 437b52e1a9ec1f9623b863ce42933041f7e9a02b Mon Sep 17 00:00:00 2001 From: Adam Pocock Date: Thu, 12 Oct 2023 19:58:02 -0400 Subject: [PATCH] Fixing variable name. --- .../ai/onnxruntime/reactnative/OnnxruntimeModuleTest.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/js/react_native/android/src/androidTest/java/ai/onnxruntime/reactnative/OnnxruntimeModuleTest.java b/js/react_native/android/src/androidTest/java/ai/onnxruntime/reactnative/OnnxruntimeModuleTest.java index 755c01bc6b062..824b814da3e6c 100644 --- a/js/react_native/android/src/androidTest/java/ai/onnxruntime/reactnative/OnnxruntimeModuleTest.java +++ b/js/react_native/android/src/androidTest/java/ai/onnxruntime/reactnative/OnnxruntimeModuleTest.java @@ -217,7 +217,7 @@ public void throwWrongSizeInput() { JavaOnlyMap options = new JavaOnlyMap(); byte[] modelBuffer = getInputModelBuffer(modelStream); ReadableMap loadMap = ortModule.loadModel(modelBuffer, options); - sessionKey = resultMap.getString("key"); + sessionKey = loadMap.getString("key"); int[] dims = new int[] {1, 7}; float[] inputData = new float[] {1.0f, 2.0f, -3.0f, Float.MIN_VALUE, Float.MAX_VALUE, 5f, -6f}; @@ -276,7 +276,7 @@ public void throwWrongRankInput() { reactContext.getResources().openRawResource(ai.onnxruntime.reactnative.test.R.raw.test_types_float)){ byte[] modelBuffer = getInputModelBuffer(modelStream); ReadableMap loadMap = ortModule.loadModel(modelBuffer, options); - sessionKey = resultMap.getString("key"); + sessionKey = loadMap.getString("key"); int[] dims = new int[] {1, 1, 7}; float[] inputData = new float[] {1.0f, 2.0f, -3.0f, Float.MIN_VALUE, Float.MAX_VALUE, 5f, -6f};