File tree Expand file tree Collapse file tree 2 files changed +16
-11
lines changed 
quickjs-android/src/androidTest/java/com/quickjs Expand file tree Collapse file tree 2 files changed +16
-11
lines changed Original file line number Diff line number Diff line change @@ -9,7 +9,7 @@ quickjs-android 是 QuickJS JavaScript 引擎的 Andoroid 接口框架,实现
99##### 引入依赖  
1010
1111``` groovy 
12- implementation 'io.github.taoweiji.quickjs:quickjs-android:1.1.2 ' 
12+ implementation 'io.github.taoweiji.quickjs:quickjs-android:1.1.3 ' 
1313``` 
1414
1515##### 简单示例  
Original file line number Diff line number Diff line change @@ -98,15 +98,20 @@ public void executeObjectScript() {
9898
9999 @ Test 
100100 public  void  executeObjectScriptException () {
101-  context .executeVoidScript ("function test1(params) {\n "  +
102-  " params.say();\n "  +
103-  "}\n "  +
104-  "function test2(params) {\n "  +
105-  " test1(params);\n "  +
106-  "}\n "  +
107-  "function test3(params) {\n "  +
108-  " test2(params);\n "  +
109-  "}\n "  +
110-  "test3(\" \" );" , "file.js" );
101+  try  {
102+  context .executeVoidScript ("function test1(params) {\n "  +
103+  " params.say();\n "  +
104+  "}\n "  +
105+  "function test2(params) {\n "  +
106+  " test1(params);\n "  +
107+  "}\n "  +
108+  "function test3(params) {\n "  +
109+  " test2(params);\n "  +
110+  "}\n "  +
111+  "test3(\" \" );" , "file.js" );
112+  throw  new  Exception ();
113+  } catch  (Exception  e ) {
114+  assertEquals (QuickJSException .class , e .getClass ());
115+  }
111116 }
112117}
                         You can’t perform that action at this time. 
           
                  
0 commit comments