feature #I9H6GN 优化代码

This commit is contained in:
Dale Lee 2024-05-04 15:33:03 +08:00
parent 90ed04e5b9
commit 621790896b
1 changed files with 0 additions and 13 deletions

View File

@ -23,19 +23,6 @@ public class ValidateKotlinScriptComponentTest {
String wrongScript = "val number: Int = \"123\"";
// 使用转换函数
String correctScript = "val number: Int = \"123\".toInt()";
// ScriptEngineManager scriptEngineManager = new ScriptEngineManager();
// ScriptEngine scriptEngine = scriptEngineManager.getEngineByName("kotlin");
// Compilable compilable = (Compilable) scriptEngine;
// compilable.compile(correctScript);
// try {
// ScriptExecutor scriptExecutor = ScriptExecutorFactory.loadInstance()
// .getScriptExecutor(ScriptTypeEnum.KOTLIN.getDisplayName());
// scriptExecutor.compile(wrongScript);
// } catch (Exception e) {
//
// }
Assertions.assertTrue(ScriptValidator.validate(correctScript));
Assertions.assertFalse(ScriptValidator.validate(wrongScript));