File tree Expand file tree Collapse file tree 1 file changed +40
-0
lines changed
extension/android/executorch_android/src/androidTest/java/org/pytorch/executorch Expand file tree Collapse file tree 1 file changed +40
-0
lines changed Original file line number Diff line number Diff line change
1
+ /*
2
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
3
+ * All rights reserved.
4
+ *
5
+ * This source code is licensed under the BSD-style license found in the
6
+ * LICENSE file in the root directory of this source tree.
7
+ */
8
+
9
+ package org .pytorch .executorch ;
10
+
11
+ import static org .junit .Assert .assertTrue ;
12
+ import static org .junit .Assert .assertNotNull ;
13
+
14
+ import androidx .test .ext .junit .runners .AndroidJUnit4 ;
15
+ import org .junit .runner .RunWith ;
16
+ import org .junit .Test ;
17
+
18
+ /** Unit tests for {@link Runtime}. */
19
+ @ RunWith (AndroidJUnit4 .class )
20
+ public class RuntimeInstrumentationTest {
21
+
22
+ @ Test
23
+ public void testRuntimeApi () {
24
+ assertTrue (Runtime .isInitialized ());
25
+
26
+ String [] ops = Runtime .getRegisteredOps ();
27
+ String [] backends = Runtime .getRegisteredBackends ();
28
+
29
+ assertNotNull (ops );
30
+ assertNotNull (backends );
31
+
32
+ for (String op : ops ) {
33
+ assertNotNull (op );
34
+ }
35
+
36
+ for (String backend : backends ) {
37
+ assertNotNull (backend );
38
+ }
39
+ }
40
+ }
You can’t perform that action at this time.
0 commit comments