This is an automated email from the ASF dual-hosted git repository.
sergeykamov pushed a commit to branch NLPCRAFT-473
in repository https://gitbox.apache.org/repos/asf/incubator-nlpcraft.git
The following commit(s) were added to refs/heads/NLPCRAFT-473 by this push:
new 8a4d8b2 WIP.
8a4d8b2 is described below
commit 8a4d8b2fc333a823f942ee309889a4554f0f7df9
Author: Sergey Kamov <[email protected]>
AuthorDate: Sat Jan 29 10:29:13 2022 +0300
WIP.
---
.../internal/intent/compiler/NCIDLCompilerSpec.scala | 14 +++++++-------
1 file changed, 7 insertions(+), 7 deletions(-)
diff --git
a/nlpcraft/src/test/scala/org/apache/nlpcraft/internal/intent/compiler/NCIDLCompilerSpec.scala
b/nlpcraft/src/test/scala/org/apache/nlpcraft/internal/intent/compiler/NCIDLCompilerSpec.scala
index b418e26..f4b0d5c 100644
---
a/nlpcraft/src/test/scala/org/apache/nlpcraft/internal/intent/compiler/NCIDLCompilerSpec.scala
+++
b/nlpcraft/src/test/scala/org/apache/nlpcraft/internal/intent/compiler/NCIDLCompilerSpec.scala
@@ -292,19 +292,19 @@ class NCIDLCompilerSpec:
)
@Test
- def testImport(): Unit =
require(NCIDLCompiler.compile("import('scan/idl.idl')", CFG, "-").size == 1)
+ def testImport(): Unit =
require(NCIDLCompiler.compile("import('scan/idl.idl')", CFG,
"test-origin").size == 1)
@Test
def testEmpty(): Unit =
- def test0(f: () => Unit): Unit =
+ def test0(idl: String): Unit =
try
- f()
+ NCIDLCompiler.compile(idl, CFG, "test-origin")
require(false)
catch
- case e: NCException => println(s"Expected error: ${e}")
+ case e: NCException => println(s"Expected error: $e")
- test0(() => NCIDLCompiler.compile("", CFG, "-"))
- test0(() => NCIDLCompiler.compile(" ", CFG, "-"))
- test0(() => NCIDLCompiler.compile(null, CFG, "-"))
+ test0("")
+ test0(" ")
+ test0(null)