You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@daffodil.apache.org by GitBox <gi...@apache.org> on 2020/07/10 13:10:35 UTC

[GitHub] [incubator-daffodil] tuxji commented on a change in pull request #395: Add test_nulPattern1

tuxji commented on a change in pull request #395:
URL: https://github.com/apache/incubator-daffodil/pull/395#discussion_r452832879



##########
File path: daffodil-test/src/test/scala/org/apache/daffodil/section05/facets/TestNulChars.scala
##########
@@ -0,0 +1,45 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.daffodil.section05.facets
+
+import org.apache.daffodil.tdml.Runner
+import org.junit.AfterClass
+import org.junit.Test
+
+object TestNulChars {
+  lazy val runner = Runner("/org/apache/daffodil/section05/facets", "NulChars.tdml")
+
+  @AfterClass def shutDown = {
+    runner.reset
+  }
+}
+
+import TestNulChars._
+
+class TestNulChars {
+
+  // DAFFODIL-2363 &#xE000; (NUL replacement into XML) can't be used in pattern facet. With full validation.
+  // @Test def test_nulPattern1() = { runner.runOneTest("nulPattern1") }
+
+  // DAFFODIL-2364 - infinite loop
+  // @Test def test_nulPad1() = { runner.runOneTest("nulPad1") }
+
+  @Test def ignoreThisDummyTestToPreventIDEFromRemovingImports() = {
+    // TODO Delete this dummy test once at least one of the above tests is made to work.
+    runner.asInstanceOf[AnyRef]

Review comment:
       This dummy test actually fails too:
   
   `[error] Test org.apache.daffodil.section05.facets.TestNulChars.initializationError failed: java.lang.Exception: Method ignoreThisDummyTestToPreventIDEFromRemovingImports() should be void, took 0.002 sec`
   
   I suggest changing line 41 to:
   
   `  @Test def ignoreThisDummyTestToPreventIDEFromRemovingImports(): Unit = {`
   
   I also grep'ed @Test and noticed the rest of the tests are inconsistent; the majority of them have the explicit : Unit type, but some omit it (they have just () = { ...).




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org