diff --git a/extension/android/executorch_android/src/androidTest/java/org/pytorch/executorch/RuntimeInstrumentationTest.java b/extension/android/executorch_android/src/androidTest/java/org/pytorch/executorch/RuntimeInstrumentationTest.java deleted file mode 100644 index e65507a424b..00000000000 --- a/extension/android/executorch_android/src/androidTest/java/org/pytorch/executorch/RuntimeInstrumentationTest.java +++ /dev/null @@ -1,37 +0,0 @@ -/* - * Copyright (c) Meta Platforms, Inc. and affiliates. - * All rights reserved. - * - * This source code is licensed under the BSD-style license found in the - * LICENSE file in the root directory of this source tree. - */ - -package org.pytorch.executorch; - -import static org.junit.Assert.assertNotNull; - -import androidx.test.ext.junit.runners.AndroidJUnit4; -import org.junit.Test; -import org.junit.runner.RunWith; - -/** Unit tests for {@link ExecuTorchRuntime}. */ -@RunWith(AndroidJUnit4.class) -public class RuntimeInstrumentationTest { - - @Test - public void testRuntimeApi() { - String[] ops = ExecuTorchRuntime.getRegisteredOps(); - String[] backends = ExecuTorchRuntime.getRegisteredBackends(); - - assertNotNull(ops); - assertNotNull(backends); - - for (String op : ops) { - assertNotNull(op); - } - - for (String backend : backends) { - assertNotNull(backend); - } - } -} diff --git a/extension/android/executorch_android/src/androidTest/java/org/pytorch/executorch/RuntimeInstrumentationTest.kt b/extension/android/executorch_android/src/androidTest/java/org/pytorch/executorch/RuntimeInstrumentationTest.kt new file mode 100644 index 00000000000..1bb4ef21d52 --- /dev/null +++ b/extension/android/executorch_android/src/androidTest/java/org/pytorch/executorch/RuntimeInstrumentationTest.kt @@ -0,0 +1,34 @@ +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. + */ +package org.pytorch.executorch + +import androidx.test.ext.junit.runners.AndroidJUnit4 +import org.junit.Assert +import org.junit.Test +import org.junit.runner.RunWith + +/** Unit tests for [ExecuTorchRuntime]. */ +@RunWith(AndroidJUnit4::class) +class RuntimeInstrumentationTest { + @Test + fun testRuntimeApi() { + val ops = ExecuTorchRuntime.getRegisteredOps() + val backends = ExecuTorchRuntime.getRegisteredBackends() + + Assert.assertNotNull(ops) + Assert.assertNotNull(backends) + + for (op in ops) { + Assert.assertNotNull(op) + } + + for (backend in backends) { + Assert.assertNotNull(backend) + } + } +}