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 74efae9  WIP.
74efae9 is described below

commit 74efae947b4b10ac8f9e736ec00d13d359a6f2b7
Author: Sergey Kamov <[email protected]>
AuthorDate: Thu Jan 27 19:01:02 2022 +0300

    WIP.
---
 .../internal/impl/scan/NCModelIntentsInvalidArgsSpec.scala    | 11 ++++++++---
 .../internal/impl/scan/NCModelIntentsNestedSpec.scala         |  4 +++-
 2 files changed, 11 insertions(+), 4 deletions(-)

diff --git 
a/nlpcraft/src/test/scala/org/apache/nlpcraft/internal/impl/scan/NCModelIntentsInvalidArgsSpec.scala
 
b/nlpcraft/src/test/scala/org/apache/nlpcraft/internal/impl/scan/NCModelIntentsInvalidArgsSpec.scala
index 46dcb5b..1283fcb 100644
--- 
a/nlpcraft/src/test/scala/org/apache/nlpcraft/internal/impl/scan/NCModelIntentsInvalidArgsSpec.scala
+++ 
b/nlpcraft/src/test/scala/org/apache/nlpcraft/internal/impl/scan/NCModelIntentsInvalidArgsSpec.scala
@@ -115,8 +115,11 @@ class NCModelIntentsInvalidArgsSpec:
             require(false)
         catch
             case e: NCException =>
-                if e.getCause != null && 
e.getCause.isInstanceOf[ClassCastException] then e.printStackTrace(System.out)
-                else throw e
+                if e.getCause != null && 
e.getCause.isInstanceOf[ClassCastException] then
+                    println("Expected stack trace:")
+                    e.printStackTrace(System.out)
+                else
+                    throw e
 
     private def testScanValidation(mdl: NCModel): Unit =
         try
@@ -124,7 +127,9 @@ class NCModelIntentsInvalidArgsSpec:
 
             require(false)
         catch
-            case e: NCException => e.printStackTrace(System.out)
+            case e: NCException =>
+                println("Expected stack trace:")
+                e.printStackTrace(System.out)
 
     @Test
     def test(): Unit =
diff --git 
a/nlpcraft/src/test/scala/org/apache/nlpcraft/internal/impl/scan/NCModelIntentsNestedSpec.scala
 
b/nlpcraft/src/test/scala/org/apache/nlpcraft/internal/impl/scan/NCModelIntentsNestedSpec.scala
index fcd9800..378bfd9 100644
--- 
a/nlpcraft/src/test/scala/org/apache/nlpcraft/internal/impl/scan/NCModelIntentsNestedSpec.scala
+++ 
b/nlpcraft/src/test/scala/org/apache/nlpcraft/internal/impl/scan/NCModelIntentsNestedSpec.scala
@@ -66,4 +66,6 @@ class NCModelIntentsNestedSpec:
 
             require(false)
         catch
-            case e: NCException => e.printStackTrace(System.out)
+            case e: NCException =>
+                println("Expected stack trace:")
+                e.printStackTrace(System.out)

Reply via email to