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/09/11 14:13:22 UTC
[GitHub] [incubator-daffodil] rsteinberger opened a new pull request #416: Throw SDE in the case of a choice with no branches
rsteinberger opened a new pull request #416:
URL: https://github.com/apache/incubator-daffodil/pull/416
Section 15 of the spec satates that a choice that declares no branches
in the DFDL schema is a schema definition error.
Daffodil-1032
----------------------------------------------------------------
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
[GitHub] [incubator-daffodil] stevedlawrence commented on a change in pull request #416: Throw SDE in the case of a choice with no branches
Posted by GitBox <gi...@apache.org>.
stevedlawrence commented on a change in pull request #416:
URL: https://github.com/apache/incubator-daffodil/pull/416#discussion_r487076908
##########
File path: daffodil-test/src/test/scala/org/apache/daffodil/section15/choice_groups/TestChoice.scala
##########
@@ -123,9 +124,6 @@ class TestChoice {
@Test def test_direct_dispatch_16(): Unit = { runnerCH.runOneTest("direct_dispatch_16") }
@Test def test_direct_dispatch_17(): Unit = { runnerCH.runOneTest("direct_dispatch_17") }
- //@Test def test_choice_noBranch() { runnerCH.runOneTest("choice_noBranch") } - Test consumes no data, which causes a TDMLError
-
-
Review comment:
Why did you delete the choice_noBranch test and replace it with a new one? Was something wrong with choice_noBranch? That name feels more appropriate than optionalChoice00, since this isn't testing optional choices.
##########
File path: daffodil-core/src/main/scala/org/apache/daffodil/dsom/ChoiceGroup.scala
##########
@@ -201,6 +202,12 @@ abstract class ChoiceTermBase(
}
}.value
+ final lazy val noBranchesFound = LV('noBranchesFound) {
+ if(groupMembers.size.equals(0)) {
Review comment:
The standard in scala is to use ``==`` instead of ``.equals()``. Also note that there should be a space between ``if`` and the open paren.
##########
File path: daffodil-test/src/test/scala/org/apache/daffodil/section15/choice_groups/TestChoice.scala
##########
@@ -123,9 +124,6 @@ class TestChoice {
@Test def test_direct_dispatch_16(): Unit = { runnerCH.runOneTest("direct_dispatch_16") }
@Test def test_direct_dispatch_17(): Unit = { runnerCH.runOneTest("direct_dispatch_17") }
- //@Test def test_choice_noBranch() { runnerCH.runOneTest("choice_noBranch") } - Test consumes no data, which causes a TDMLError
-
-
Review comment:
Gotcha. I suspect this was originally split out beause it's not a valid schema and in some cases that can cause issues. But since it doesn't, seems reasonable to put it along side the other schemas. This change is fine with me.
##########
File path: daffodil-test/src/test/scala/org/apache/daffodil/section15/choice_groups/TestChoice.scala
##########
@@ -123,9 +124,6 @@ class TestChoice {
@Test def test_direct_dispatch_16(): Unit = { runnerCH.runOneTest("direct_dispatch_16") }
@Test def test_direct_dispatch_17(): Unit = { runnerCH.runOneTest("direct_dispatch_17") }
- //@Test def test_choice_noBranch() { runnerCH.runOneTest("choice_noBranch") } - Test consumes no data, which causes a TDMLError
-
-
Review comment:
Why did you delete the choice_noBranch test and replace it with a new one? Was something wrong with choice_noBranch? That name feels more appropriate than optionalChoice00, since this isn't testing optional choices.
##########
File path: daffodil-core/src/main/scala/org/apache/daffodil/dsom/ChoiceGroup.scala
##########
@@ -201,6 +202,12 @@ abstract class ChoiceTermBase(
}
}.value
+ final lazy val noBranchesFound = LV('noBranchesFound) {
+ if(groupMembers.size.equals(0)) {
Review comment:
The standard in scala is to use ``==`` instead of ``.equals()``. Also note that there should be a space between ``if`` and the open paren.
##########
File path: daffodil-test/src/test/scala/org/apache/daffodil/section15/choice_groups/TestChoice.scala
##########
@@ -123,9 +124,6 @@ class TestChoice {
@Test def test_direct_dispatch_16(): Unit = { runnerCH.runOneTest("direct_dispatch_16") }
@Test def test_direct_dispatch_17(): Unit = { runnerCH.runOneTest("direct_dispatch_17") }
- //@Test def test_choice_noBranch() { runnerCH.runOneTest("choice_noBranch") } - Test consumes no data, which causes a TDMLError
-
-
Review comment:
Gotcha. I suspect this was originally split out beause it's not a valid schema and in some cases that can cause issues. But since it doesn't, seems reasonable to put it along side the other schemas. This change is fine with me.
##########
File path: daffodil-test/src/test/scala/org/apache/daffodil/section15/choice_groups/TestChoice.scala
##########
@@ -123,9 +124,6 @@ class TestChoice {
@Test def test_direct_dispatch_16(): Unit = { runnerCH.runOneTest("direct_dispatch_16") }
@Test def test_direct_dispatch_17(): Unit = { runnerCH.runOneTest("direct_dispatch_17") }
- //@Test def test_choice_noBranch() { runnerCH.runOneTest("choice_noBranch") } - Test consumes no data, which causes a TDMLError
-
-
Review comment:
Why did you delete the choice_noBranch test and replace it with a new one? Was something wrong with choice_noBranch? That name feels more appropriate than optionalChoice00, since this isn't testing optional choices.
##########
File path: daffodil-core/src/main/scala/org/apache/daffodil/dsom/ChoiceGroup.scala
##########
@@ -201,6 +202,12 @@ abstract class ChoiceTermBase(
}
}.value
+ final lazy val noBranchesFound = LV('noBranchesFound) {
+ if(groupMembers.size.equals(0)) {
Review comment:
The standard in scala is to use ``==`` instead of ``.equals()``. Also note that there should be a space between ``if`` and the open paren.
##########
File path: daffodil-test/src/test/scala/org/apache/daffodil/section15/choice_groups/TestChoice.scala
##########
@@ -123,9 +124,6 @@ class TestChoice {
@Test def test_direct_dispatch_16(): Unit = { runnerCH.runOneTest("direct_dispatch_16") }
@Test def test_direct_dispatch_17(): Unit = { runnerCH.runOneTest("direct_dispatch_17") }
- //@Test def test_choice_noBranch() { runnerCH.runOneTest("choice_noBranch") } - Test consumes no data, which causes a TDMLError
-
-
Review comment:
Gotcha. I suspect this was originally split out beause it's not a valid schema and in some cases that can cause issues. But since it doesn't, seems reasonable to put it along side the other schemas. This change is fine with me.
##########
File path: daffodil-test/src/test/scala/org/apache/daffodil/section15/choice_groups/TestChoice.scala
##########
@@ -123,9 +124,6 @@ class TestChoice {
@Test def test_direct_dispatch_16(): Unit = { runnerCH.runOneTest("direct_dispatch_16") }
@Test def test_direct_dispatch_17(): Unit = { runnerCH.runOneTest("direct_dispatch_17") }
- //@Test def test_choice_noBranch() { runnerCH.runOneTest("choice_noBranch") } - Test consumes no data, which causes a TDMLError
-
-
Review comment:
Why did you delete the choice_noBranch test and replace it with a new one? Was something wrong with choice_noBranch? That name feels more appropriate than optionalChoice00, since this isn't testing optional choices.
##########
File path: daffodil-core/src/main/scala/org/apache/daffodil/dsom/ChoiceGroup.scala
##########
@@ -201,6 +202,12 @@ abstract class ChoiceTermBase(
}
}.value
+ final lazy val noBranchesFound = LV('noBranchesFound) {
+ if(groupMembers.size.equals(0)) {
Review comment:
The standard in scala is to use ``==`` instead of ``.equals()``. Also note that there should be a space between ``if`` and the open paren.
##########
File path: daffodil-test/src/test/scala/org/apache/daffodil/section15/choice_groups/TestChoice.scala
##########
@@ -123,9 +124,6 @@ class TestChoice {
@Test def test_direct_dispatch_16(): Unit = { runnerCH.runOneTest("direct_dispatch_16") }
@Test def test_direct_dispatch_17(): Unit = { runnerCH.runOneTest("direct_dispatch_17") }
- //@Test def test_choice_noBranch() { runnerCH.runOneTest("choice_noBranch") } - Test consumes no data, which causes a TDMLError
-
-
Review comment:
Gotcha. I suspect this was originally split out beause it's not a valid schema and in some cases that can cause issues. But since it doesn't, seems reasonable to put it along side the other schemas. This change is fine with me.
##########
File path: daffodil-test/src/test/scala/org/apache/daffodil/section15/choice_groups/TestChoice.scala
##########
@@ -123,9 +124,6 @@ class TestChoice {
@Test def test_direct_dispatch_16(): Unit = { runnerCH.runOneTest("direct_dispatch_16") }
@Test def test_direct_dispatch_17(): Unit = { runnerCH.runOneTest("direct_dispatch_17") }
- //@Test def test_choice_noBranch() { runnerCH.runOneTest("choice_noBranch") } - Test consumes no data, which causes a TDMLError
-
-
Review comment:
Why did you delete the choice_noBranch test and replace it with a new one? Was something wrong with choice_noBranch? That name feels more appropriate than optionalChoice00, since this isn't testing optional choices.
##########
File path: daffodil-core/src/main/scala/org/apache/daffodil/dsom/ChoiceGroup.scala
##########
@@ -201,6 +202,12 @@ abstract class ChoiceTermBase(
}
}.value
+ final lazy val noBranchesFound = LV('noBranchesFound) {
+ if(groupMembers.size.equals(0)) {
Review comment:
The standard in scala is to use ``==`` instead of ``.equals()``. Also note that there should be a space between ``if`` and the open paren.
##########
File path: daffodil-test/src/test/scala/org/apache/daffodil/section15/choice_groups/TestChoice.scala
##########
@@ -123,9 +124,6 @@ class TestChoice {
@Test def test_direct_dispatch_16(): Unit = { runnerCH.runOneTest("direct_dispatch_16") }
@Test def test_direct_dispatch_17(): Unit = { runnerCH.runOneTest("direct_dispatch_17") }
- //@Test def test_choice_noBranch() { runnerCH.runOneTest("choice_noBranch") } - Test consumes no data, which causes a TDMLError
-
-
Review comment:
Gotcha. I suspect this was originally split out beause it's not a valid schema and in some cases that can cause issues. But since it doesn't, seems reasonable to put it along side the other schemas. This change is fine with me.
----------------------------------------------------------------
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
[GitHub] [incubator-daffodil] stevedlawrence commented on a change in pull request #416: Throw SDE in the case of a choice with no branches
Posted by GitBox <gi...@apache.org>.
stevedlawrence commented on a change in pull request #416:
URL: https://github.com/apache/incubator-daffodil/pull/416#discussion_r487076908
##########
File path: daffodil-test/src/test/scala/org/apache/daffodil/section15/choice_groups/TestChoice.scala
##########
@@ -123,9 +124,6 @@ class TestChoice {
@Test def test_direct_dispatch_16(): Unit = { runnerCH.runOneTest("direct_dispatch_16") }
@Test def test_direct_dispatch_17(): Unit = { runnerCH.runOneTest("direct_dispatch_17") }
- //@Test def test_choice_noBranch() { runnerCH.runOneTest("choice_noBranch") } - Test consumes no data, which causes a TDMLError
-
-
Review comment:
Why did you delete the choice_noBranch test and replace it with a new one? Was something wrong with choice_noBranch? That name feels more appropriate than optionalChoice00, since this isn't testing optional choices.
##########
File path: daffodil-core/src/main/scala/org/apache/daffodil/dsom/ChoiceGroup.scala
##########
@@ -201,6 +202,12 @@ abstract class ChoiceTermBase(
}
}.value
+ final lazy val noBranchesFound = LV('noBranchesFound) {
+ if(groupMembers.size.equals(0)) {
Review comment:
The standard in scala is to use ``==`` instead of ``.equals()``. Also note that there should be a space between ``if`` and the open paren.
##########
File path: daffodil-test/src/test/scala/org/apache/daffodil/section15/choice_groups/TestChoice.scala
##########
@@ -123,9 +124,6 @@ class TestChoice {
@Test def test_direct_dispatch_16(): Unit = { runnerCH.runOneTest("direct_dispatch_16") }
@Test def test_direct_dispatch_17(): Unit = { runnerCH.runOneTest("direct_dispatch_17") }
- //@Test def test_choice_noBranch() { runnerCH.runOneTest("choice_noBranch") } - Test consumes no data, which causes a TDMLError
-
-
Review comment:
Gotcha. I suspect this was originally split out beause it's not a valid schema and in some cases that can cause issues. But since it doesn't, seems reasonable to put it along side the other schemas. This change is fine with me.
----------------------------------------------------------------
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
[GitHub] [incubator-daffodil] rsteinberger commented on a change in pull request #416: Throw SDE in the case of a choice with no branches
Posted by GitBox <gi...@apache.org>.
rsteinberger commented on a change in pull request #416:
URL: https://github.com/apache/incubator-daffodil/pull/416#discussion_r487186031
##########
File path: daffodil-test/src/test/scala/org/apache/daffodil/section15/choice_groups/TestChoice.scala
##########
@@ -38,6 +38,9 @@ class TestChoice {
import TestChoice._
+ @Test def test_choice_noBranch (): Unit = { runnerCH.runOneTest("choice_noBranch") }
+
+ @Test def test_optionalChoice00(): Unit = { runnerCH.runOneTest("optionalChoice00") }
Review comment:
Yep, thanks John.
----------------------------------------------------------------
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
[GitHub] [incubator-daffodil] tuxji commented on a change in pull request #416: Throw SDE in the case of a choice with no branches
Posted by GitBox <gi...@apache.org>.
tuxji commented on a change in pull request #416:
URL: https://github.com/apache/incubator-daffodil/pull/416#discussion_r487180702
##########
File path: daffodil-test/src/test/scala/org/apache/daffodil/section15/choice_groups/TestChoice.scala
##########
@@ -38,6 +38,9 @@ class TestChoice {
import TestChoice._
+ @Test def test_choice_noBranch (): Unit = { runnerCH.runOneTest("choice_noBranch") }
+
+ @Test def test_optionalChoice00(): Unit = { runnerCH.runOneTest("optionalChoice00") }
Review comment:
Rick, you need to delete test_optionalChoice00 since the "optionalChoice00" test doesn't exist. This is the reason why the PR checks are failing with the message
```
[error] Test org.apache.daffodil.section15.choice_groups.TestChoice.test_optionalChoice00 failed: org.apache.daffodil.tdml.TDMLExceptionImpl: test optionalChoice00 was not found., took 0.001 sec
[error] at org.apache.daffodil.tdml.TDMLException$.apply(TDMLException.scala:31)
[error] at org.apache.daffodil.tdml.DFDLTestSuite.runOneTest(TDMLRunner.scala:388)
[error] at org.apache.daffodil.tdml.Runner.runOneTest(RunnerFactory.scala:144)
[error] at org.apache.daffodil.tdml.Runner.runOneTest(RunnerFactory.scala:150)
[error] at org.apache.daffodil.section15.choice_groups.TestChoice.test_optionalChoice00(TestChoice.scala:43)
[error] ...
```
----------------------------------------------------------------
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
[GitHub] [incubator-daffodil] rsteinberger commented on a change in pull request #416: Throw SDE in the case of a choice with no branches
Posted by GitBox <gi...@apache.org>.
rsteinberger commented on a change in pull request #416:
URL: https://github.com/apache/incubator-daffodil/pull/416#discussion_r487160653
##########
File path: daffodil-core/src/main/scala/org/apache/daffodil/dsom/ChoiceGroup.scala
##########
@@ -201,6 +202,12 @@ abstract class ChoiceTermBase(
}
}.value
+ final lazy val noBranchesFound = LV('noBranchesFound) {
+ if(groupMembers.size.equals(0)) {
Review comment:
Done
----------------------------------------------------------------
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
[GitHub] [incubator-daffodil] rsteinberger commented on a change in pull request #416: Throw SDE in the case of a choice with no branches
Posted by GitBox <gi...@apache.org>.
rsteinberger commented on a change in pull request #416:
URL: https://github.com/apache/incubator-daffodil/pull/416#discussion_r487145919
##########
File path: daffodil-test/src/test/scala/org/apache/daffodil/section15/choice_groups/TestChoice.scala
##########
@@ -123,9 +124,6 @@ class TestChoice {
@Test def test_direct_dispatch_16(): Unit = { runnerCH.runOneTest("direct_dispatch_16") }
@Test def test_direct_dispatch_17(): Unit = { runnerCH.runOneTest("direct_dispatch_17") }
- //@Test def test_choice_noBranch() { runnerCH.runOneTest("choice_noBranch") } - Test consumes no data, which causes a TDMLError
-
-
Review comment:
I didn't see the point of using the external xsd. I can changes the name if you like.
----------------------------------------------------------------
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
[GitHub] [incubator-daffodil] tuxji commented on a change in pull request #416: Throw SDE in the case of a choice with no branches
Posted by GitBox <gi...@apache.org>.
tuxji commented on a change in pull request #416:
URL: https://github.com/apache/incubator-daffodil/pull/416#discussion_r487180702
##########
File path: daffodil-test/src/test/scala/org/apache/daffodil/section15/choice_groups/TestChoice.scala
##########
@@ -38,6 +38,9 @@ class TestChoice {
import TestChoice._
+ @Test def test_choice_noBranch (): Unit = { runnerCH.runOneTest("choice_noBranch") }
+
+ @Test def test_optionalChoice00(): Unit = { runnerCH.runOneTest("optionalChoice00") }
Review comment:
Rick, you need to delete test_optionalChoice00 since the "optionalChoice00" test doesn't exist. This is the reason why the PR checks are failing with the message
```
[error] Test org.apache.daffodil.section15.choice_groups.TestChoice.test_optionalChoice00 failed: org.apache.daffodil.tdml.TDMLExceptionImpl: test optionalChoice00 was not found., took 0.001 sec
[error] at org.apache.daffodil.tdml.TDMLException$.apply(TDMLException.scala:31)
[error] at org.apache.daffodil.tdml.DFDLTestSuite.runOneTest(TDMLRunner.scala:388)
[error] at org.apache.daffodil.tdml.Runner.runOneTest(RunnerFactory.scala:144)
[error] at org.apache.daffodil.tdml.Runner.runOneTest(RunnerFactory.scala:150)
[error] at org.apache.daffodil.section15.choice_groups.TestChoice.test_optionalChoice00(TestChoice.scala:43)
[error] ...
```
##########
File path: daffodil-test/src/test/scala/org/apache/daffodil/section15/choice_groups/TestChoice.scala
##########
@@ -38,6 +38,9 @@ class TestChoice {
import TestChoice._
+ @Test def test_choice_noBranch (): Unit = { runnerCH.runOneTest("choice_noBranch") }
+
+ @Test def test_optionalChoice00(): Unit = { runnerCH.runOneTest("optionalChoice00") }
Review comment:
Rick, you need to delete test_optionalChoice00 since the "optionalChoice00" test doesn't exist. This is the reason why the PR checks are failing with the message
```
[error] Test org.apache.daffodil.section15.choice_groups.TestChoice.test_optionalChoice00 failed: org.apache.daffodil.tdml.TDMLExceptionImpl: test optionalChoice00 was not found., took 0.001 sec
[error] at org.apache.daffodil.tdml.TDMLException$.apply(TDMLException.scala:31)
[error] at org.apache.daffodil.tdml.DFDLTestSuite.runOneTest(TDMLRunner.scala:388)
[error] at org.apache.daffodil.tdml.Runner.runOneTest(RunnerFactory.scala:144)
[error] at org.apache.daffodil.tdml.Runner.runOneTest(RunnerFactory.scala:150)
[error] at org.apache.daffodil.section15.choice_groups.TestChoice.test_optionalChoice00(TestChoice.scala:43)
[error] ...
```
##########
File path: daffodil-test/src/test/scala/org/apache/daffodil/section15/choice_groups/TestChoice.scala
##########
@@ -38,6 +38,9 @@ class TestChoice {
import TestChoice._
+ @Test def test_choice_noBranch (): Unit = { runnerCH.runOneTest("choice_noBranch") }
+
+ @Test def test_optionalChoice00(): Unit = { runnerCH.runOneTest("optionalChoice00") }
Review comment:
Rick, you need to delete test_optionalChoice00 since the "optionalChoice00" test doesn't exist. This is the reason why the PR checks are failing with the message
```
[error] Test org.apache.daffodil.section15.choice_groups.TestChoice.test_optionalChoice00 failed: org.apache.daffodil.tdml.TDMLExceptionImpl: test optionalChoice00 was not found., took 0.001 sec
[error] at org.apache.daffodil.tdml.TDMLException$.apply(TDMLException.scala:31)
[error] at org.apache.daffodil.tdml.DFDLTestSuite.runOneTest(TDMLRunner.scala:388)
[error] at org.apache.daffodil.tdml.Runner.runOneTest(RunnerFactory.scala:144)
[error] at org.apache.daffodil.tdml.Runner.runOneTest(RunnerFactory.scala:150)
[error] at org.apache.daffodil.section15.choice_groups.TestChoice.test_optionalChoice00(TestChoice.scala:43)
[error] ...
```
##########
File path: daffodil-test/src/test/scala/org/apache/daffodil/section15/choice_groups/TestChoice.scala
##########
@@ -38,6 +38,9 @@ class TestChoice {
import TestChoice._
+ @Test def test_choice_noBranch (): Unit = { runnerCH.runOneTest("choice_noBranch") }
+
+ @Test def test_optionalChoice00(): Unit = { runnerCH.runOneTest("optionalChoice00") }
Review comment:
Rick, you need to delete test_optionalChoice00 since the "optionalChoice00" test doesn't exist. This is the reason why the PR checks are failing with the message
```
[error] Test org.apache.daffodil.section15.choice_groups.TestChoice.test_optionalChoice00 failed: org.apache.daffodil.tdml.TDMLExceptionImpl: test optionalChoice00 was not found., took 0.001 sec
[error] at org.apache.daffodil.tdml.TDMLException$.apply(TDMLException.scala:31)
[error] at org.apache.daffodil.tdml.DFDLTestSuite.runOneTest(TDMLRunner.scala:388)
[error] at org.apache.daffodil.tdml.Runner.runOneTest(RunnerFactory.scala:144)
[error] at org.apache.daffodil.tdml.Runner.runOneTest(RunnerFactory.scala:150)
[error] at org.apache.daffodil.section15.choice_groups.TestChoice.test_optionalChoice00(TestChoice.scala:43)
[error] ...
```
##########
File path: daffodil-test/src/test/scala/org/apache/daffodil/section15/choice_groups/TestChoice.scala
##########
@@ -38,6 +38,9 @@ class TestChoice {
import TestChoice._
+ @Test def test_choice_noBranch (): Unit = { runnerCH.runOneTest("choice_noBranch") }
+
+ @Test def test_optionalChoice00(): Unit = { runnerCH.runOneTest("optionalChoice00") }
Review comment:
Rick, you need to delete test_optionalChoice00 since the "optionalChoice00" test doesn't exist. This is the reason why the PR checks are failing with the message
```
[error] Test org.apache.daffodil.section15.choice_groups.TestChoice.test_optionalChoice00 failed: org.apache.daffodil.tdml.TDMLExceptionImpl: test optionalChoice00 was not found., took 0.001 sec
[error] at org.apache.daffodil.tdml.TDMLException$.apply(TDMLException.scala:31)
[error] at org.apache.daffodil.tdml.DFDLTestSuite.runOneTest(TDMLRunner.scala:388)
[error] at org.apache.daffodil.tdml.Runner.runOneTest(RunnerFactory.scala:144)
[error] at org.apache.daffodil.tdml.Runner.runOneTest(RunnerFactory.scala:150)
[error] at org.apache.daffodil.section15.choice_groups.TestChoice.test_optionalChoice00(TestChoice.scala:43)
[error] ...
```
##########
File path: daffodil-test/src/test/scala/org/apache/daffodil/section15/choice_groups/TestChoice.scala
##########
@@ -38,6 +38,9 @@ class TestChoice {
import TestChoice._
+ @Test def test_choice_noBranch (): Unit = { runnerCH.runOneTest("choice_noBranch") }
+
+ @Test def test_optionalChoice00(): Unit = { runnerCH.runOneTest("optionalChoice00") }
Review comment:
Rick, you need to delete test_optionalChoice00 since the "optionalChoice00" test doesn't exist. This is the reason why the PR checks are failing with the message
```
[error] Test org.apache.daffodil.section15.choice_groups.TestChoice.test_optionalChoice00 failed: org.apache.daffodil.tdml.TDMLExceptionImpl: test optionalChoice00 was not found., took 0.001 sec
[error] at org.apache.daffodil.tdml.TDMLException$.apply(TDMLException.scala:31)
[error] at org.apache.daffodil.tdml.DFDLTestSuite.runOneTest(TDMLRunner.scala:388)
[error] at org.apache.daffodil.tdml.Runner.runOneTest(RunnerFactory.scala:144)
[error] at org.apache.daffodil.tdml.Runner.runOneTest(RunnerFactory.scala:150)
[error] at org.apache.daffodil.section15.choice_groups.TestChoice.test_optionalChoice00(TestChoice.scala:43)
[error] ...
```
##########
File path: daffodil-test/src/test/scala/org/apache/daffodil/section15/choice_groups/TestChoice.scala
##########
@@ -38,6 +38,9 @@ class TestChoice {
import TestChoice._
+ @Test def test_choice_noBranch (): Unit = { runnerCH.runOneTest("choice_noBranch") }
+
+ @Test def test_optionalChoice00(): Unit = { runnerCH.runOneTest("optionalChoice00") }
Review comment:
Rick, you need to delete test_optionalChoice00 since the "optionalChoice00" test doesn't exist. This is the reason why the PR checks are failing with the message
```
[error] Test org.apache.daffodil.section15.choice_groups.TestChoice.test_optionalChoice00 failed: org.apache.daffodil.tdml.TDMLExceptionImpl: test optionalChoice00 was not found., took 0.001 sec
[error] at org.apache.daffodil.tdml.TDMLException$.apply(TDMLException.scala:31)
[error] at org.apache.daffodil.tdml.DFDLTestSuite.runOneTest(TDMLRunner.scala:388)
[error] at org.apache.daffodil.tdml.Runner.runOneTest(RunnerFactory.scala:144)
[error] at org.apache.daffodil.tdml.Runner.runOneTest(RunnerFactory.scala:150)
[error] at org.apache.daffodil.section15.choice_groups.TestChoice.test_optionalChoice00(TestChoice.scala:43)
[error] ...
```
----------------------------------------------------------------
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
[GitHub] [incubator-daffodil] tuxji commented on a change in pull request #416: Throw SDE in the case of a choice with no branches
Posted by GitBox <gi...@apache.org>.
tuxji commented on a change in pull request #416:
URL: https://github.com/apache/incubator-daffodil/pull/416#discussion_r487180702
##########
File path: daffodil-test/src/test/scala/org/apache/daffodil/section15/choice_groups/TestChoice.scala
##########
@@ -38,6 +38,9 @@ class TestChoice {
import TestChoice._
+ @Test def test_choice_noBranch (): Unit = { runnerCH.runOneTest("choice_noBranch") }
+
+ @Test def test_optionalChoice00(): Unit = { runnerCH.runOneTest("optionalChoice00") }
Review comment:
Rick, you need to delete test_optionalChoice00 since the "optionalChoice00" test doesn't exist. This is the reason why the PR checks are failing with the message
```
[error] Test org.apache.daffodil.section15.choice_groups.TestChoice.test_optionalChoice00 failed: org.apache.daffodil.tdml.TDMLExceptionImpl: test optionalChoice00 was not found., took 0.001 sec
[error] at org.apache.daffodil.tdml.TDMLException$.apply(TDMLException.scala:31)
[error] at org.apache.daffodil.tdml.DFDLTestSuite.runOneTest(TDMLRunner.scala:388)
[error] at org.apache.daffodil.tdml.Runner.runOneTest(RunnerFactory.scala:144)
[error] at org.apache.daffodil.tdml.Runner.runOneTest(RunnerFactory.scala:150)
[error] at org.apache.daffodil.section15.choice_groups.TestChoice.test_optionalChoice00(TestChoice.scala:43)
[error] ...
```
##########
File path: daffodil-test/src/test/scala/org/apache/daffodil/section15/choice_groups/TestChoice.scala
##########
@@ -38,6 +38,9 @@ class TestChoice {
import TestChoice._
+ @Test def test_choice_noBranch (): Unit = { runnerCH.runOneTest("choice_noBranch") }
+
+ @Test def test_optionalChoice00(): Unit = { runnerCH.runOneTest("optionalChoice00") }
Review comment:
Rick, you need to delete test_optionalChoice00 since the "optionalChoice00" test doesn't exist. This is the reason why the PR checks are failing with the message
```
[error] Test org.apache.daffodil.section15.choice_groups.TestChoice.test_optionalChoice00 failed: org.apache.daffodil.tdml.TDMLExceptionImpl: test optionalChoice00 was not found., took 0.001 sec
[error] at org.apache.daffodil.tdml.TDMLException$.apply(TDMLException.scala:31)
[error] at org.apache.daffodil.tdml.DFDLTestSuite.runOneTest(TDMLRunner.scala:388)
[error] at org.apache.daffodil.tdml.Runner.runOneTest(RunnerFactory.scala:144)
[error] at org.apache.daffodil.tdml.Runner.runOneTest(RunnerFactory.scala:150)
[error] at org.apache.daffodil.section15.choice_groups.TestChoice.test_optionalChoice00(TestChoice.scala:43)
[error] ...
```
----------------------------------------------------------------
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
[GitHub] [incubator-daffodil] rsteinberger commented on a change in pull request #416: Throw SDE in the case of a choice with no branches
Posted by GitBox <gi...@apache.org>.
rsteinberger commented on a change in pull request #416:
URL: https://github.com/apache/incubator-daffodil/pull/416#discussion_r487145919
##########
File path: daffodil-test/src/test/scala/org/apache/daffodil/section15/choice_groups/TestChoice.scala
##########
@@ -123,9 +124,6 @@ class TestChoice {
@Test def test_direct_dispatch_16(): Unit = { runnerCH.runOneTest("direct_dispatch_16") }
@Test def test_direct_dispatch_17(): Unit = { runnerCH.runOneTest("direct_dispatch_17") }
- //@Test def test_choice_noBranch() { runnerCH.runOneTest("choice_noBranch") } - Test consumes no data, which causes a TDMLError
-
-
Review comment:
I didn't see the point of using the external xsd. I can changes the name if you like.
##########
File path: daffodil-test/src/test/scala/org/apache/daffodil/section15/choice_groups/TestChoice.scala
##########
@@ -123,9 +124,6 @@ class TestChoice {
@Test def test_direct_dispatch_16(): Unit = { runnerCH.runOneTest("direct_dispatch_16") }
@Test def test_direct_dispatch_17(): Unit = { runnerCH.runOneTest("direct_dispatch_17") }
- //@Test def test_choice_noBranch() { runnerCH.runOneTest("choice_noBranch") } - Test consumes no data, which causes a TDMLError
-
-
Review comment:
I renamed it and move it to the basic model.
##########
File path: daffodil-core/src/main/scala/org/apache/daffodil/dsom/ChoiceGroup.scala
##########
@@ -201,6 +202,12 @@ abstract class ChoiceTermBase(
}
}.value
+ final lazy val noBranchesFound = LV('noBranchesFound) {
+ if(groupMembers.size.equals(0)) {
Review comment:
Done
##########
File path: daffodil-test/src/test/scala/org/apache/daffodil/section15/choice_groups/TestChoice.scala
##########
@@ -38,6 +38,9 @@ class TestChoice {
import TestChoice._
+ @Test def test_choice_noBranch (): Unit = { runnerCH.runOneTest("choice_noBranch") }
+
+ @Test def test_optionalChoice00(): Unit = { runnerCH.runOneTest("optionalChoice00") }
Review comment:
Yep, thanks John.
----------------------------------------------------------------
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
[GitHub] [incubator-daffodil] rsteinberger commented on a change in pull request #416: Throw SDE in the case of a choice with no branches
Posted by GitBox <gi...@apache.org>.
rsteinberger commented on a change in pull request #416:
URL: https://github.com/apache/incubator-daffodil/pull/416#discussion_r487145919
##########
File path: daffodil-test/src/test/scala/org/apache/daffodil/section15/choice_groups/TestChoice.scala
##########
@@ -123,9 +124,6 @@ class TestChoice {
@Test def test_direct_dispatch_16(): Unit = { runnerCH.runOneTest("direct_dispatch_16") }
@Test def test_direct_dispatch_17(): Unit = { runnerCH.runOneTest("direct_dispatch_17") }
- //@Test def test_choice_noBranch() { runnerCH.runOneTest("choice_noBranch") } - Test consumes no data, which causes a TDMLError
-
-
Review comment:
I didn't see the point of using the external xsd. I can changes the name if you like.
##########
File path: daffodil-test/src/test/scala/org/apache/daffodil/section15/choice_groups/TestChoice.scala
##########
@@ -123,9 +124,6 @@ class TestChoice {
@Test def test_direct_dispatch_16(): Unit = { runnerCH.runOneTest("direct_dispatch_16") }
@Test def test_direct_dispatch_17(): Unit = { runnerCH.runOneTest("direct_dispatch_17") }
- //@Test def test_choice_noBranch() { runnerCH.runOneTest("choice_noBranch") } - Test consumes no data, which causes a TDMLError
-
-
Review comment:
I renamed it and move it to the basic model.
##########
File path: daffodil-core/src/main/scala/org/apache/daffodil/dsom/ChoiceGroup.scala
##########
@@ -201,6 +202,12 @@ abstract class ChoiceTermBase(
}
}.value
+ final lazy val noBranchesFound = LV('noBranchesFound) {
+ if(groupMembers.size.equals(0)) {
Review comment:
Done
##########
File path: daffodil-test/src/test/scala/org/apache/daffodil/section15/choice_groups/TestChoice.scala
##########
@@ -38,6 +38,9 @@ class TestChoice {
import TestChoice._
+ @Test def test_choice_noBranch (): Unit = { runnerCH.runOneTest("choice_noBranch") }
+
+ @Test def test_optionalChoice00(): Unit = { runnerCH.runOneTest("optionalChoice00") }
Review comment:
Yep, thanks John.
##########
File path: daffodil-test/src/test/scala/org/apache/daffodil/section15/choice_groups/TestChoice.scala
##########
@@ -123,9 +124,6 @@ class TestChoice {
@Test def test_direct_dispatch_16(): Unit = { runnerCH.runOneTest("direct_dispatch_16") }
@Test def test_direct_dispatch_17(): Unit = { runnerCH.runOneTest("direct_dispatch_17") }
- //@Test def test_choice_noBranch() { runnerCH.runOneTest("choice_noBranch") } - Test consumes no data, which causes a TDMLError
-
-
Review comment:
I didn't see the point of using the external xsd. I can changes the name if you like.
##########
File path: daffodil-test/src/test/scala/org/apache/daffodil/section15/choice_groups/TestChoice.scala
##########
@@ -123,9 +124,6 @@ class TestChoice {
@Test def test_direct_dispatch_16(): Unit = { runnerCH.runOneTest("direct_dispatch_16") }
@Test def test_direct_dispatch_17(): Unit = { runnerCH.runOneTest("direct_dispatch_17") }
- //@Test def test_choice_noBranch() { runnerCH.runOneTest("choice_noBranch") } - Test consumes no data, which causes a TDMLError
-
-
Review comment:
I renamed it and move it to the basic model.
##########
File path: daffodil-core/src/main/scala/org/apache/daffodil/dsom/ChoiceGroup.scala
##########
@@ -201,6 +202,12 @@ abstract class ChoiceTermBase(
}
}.value
+ final lazy val noBranchesFound = LV('noBranchesFound) {
+ if(groupMembers.size.equals(0)) {
Review comment:
Done
##########
File path: daffodil-test/src/test/scala/org/apache/daffodil/section15/choice_groups/TestChoice.scala
##########
@@ -38,6 +38,9 @@ class TestChoice {
import TestChoice._
+ @Test def test_choice_noBranch (): Unit = { runnerCH.runOneTest("choice_noBranch") }
+
+ @Test def test_optionalChoice00(): Unit = { runnerCH.runOneTest("optionalChoice00") }
Review comment:
Yep, thanks John.
##########
File path: daffodil-test/src/test/scala/org/apache/daffodil/section15/choice_groups/TestChoice.scala
##########
@@ -123,9 +124,6 @@ class TestChoice {
@Test def test_direct_dispatch_16(): Unit = { runnerCH.runOneTest("direct_dispatch_16") }
@Test def test_direct_dispatch_17(): Unit = { runnerCH.runOneTest("direct_dispatch_17") }
- //@Test def test_choice_noBranch() { runnerCH.runOneTest("choice_noBranch") } - Test consumes no data, which causes a TDMLError
-
-
Review comment:
I didn't see the point of using the external xsd. I can changes the name if you like.
##########
File path: daffodil-test/src/test/scala/org/apache/daffodil/section15/choice_groups/TestChoice.scala
##########
@@ -123,9 +124,6 @@ class TestChoice {
@Test def test_direct_dispatch_16(): Unit = { runnerCH.runOneTest("direct_dispatch_16") }
@Test def test_direct_dispatch_17(): Unit = { runnerCH.runOneTest("direct_dispatch_17") }
- //@Test def test_choice_noBranch() { runnerCH.runOneTest("choice_noBranch") } - Test consumes no data, which causes a TDMLError
-
-
Review comment:
I renamed it and move it to the basic model.
##########
File path: daffodil-core/src/main/scala/org/apache/daffodil/dsom/ChoiceGroup.scala
##########
@@ -201,6 +202,12 @@ abstract class ChoiceTermBase(
}
}.value
+ final lazy val noBranchesFound = LV('noBranchesFound) {
+ if(groupMembers.size.equals(0)) {
Review comment:
Done
##########
File path: daffodil-test/src/test/scala/org/apache/daffodil/section15/choice_groups/TestChoice.scala
##########
@@ -38,6 +38,9 @@ class TestChoice {
import TestChoice._
+ @Test def test_choice_noBranch (): Unit = { runnerCH.runOneTest("choice_noBranch") }
+
+ @Test def test_optionalChoice00(): Unit = { runnerCH.runOneTest("optionalChoice00") }
Review comment:
Yep, thanks John.
----------------------------------------------------------------
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
[GitHub] [incubator-daffodil] stevedlawrence merged pull request #416: Throw SDE in the case of a choice with no branches
Posted by GitBox <gi...@apache.org>.
stevedlawrence merged pull request #416:
URL: https://github.com/apache/incubator-daffodil/pull/416
----------------------------------------------------------------
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
[GitHub] [incubator-daffodil] rsteinberger commented on a change in pull request #416: Throw SDE in the case of a choice with no branches
Posted by GitBox <gi...@apache.org>.
rsteinberger commented on a change in pull request #416:
URL: https://github.com/apache/incubator-daffodil/pull/416#discussion_r487157674
##########
File path: daffodil-test/src/test/scala/org/apache/daffodil/section15/choice_groups/TestChoice.scala
##########
@@ -123,9 +124,6 @@ class TestChoice {
@Test def test_direct_dispatch_16(): Unit = { runnerCH.runOneTest("direct_dispatch_16") }
@Test def test_direct_dispatch_17(): Unit = { runnerCH.runOneTest("direct_dispatch_17") }
- //@Test def test_choice_noBranch() { runnerCH.runOneTest("choice_noBranch") } - Test consumes no data, which causes a TDMLError
-
-
Review comment:
I renamed it and move it to the basic model.
----------------------------------------------------------------
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
[GitHub] [incubator-daffodil] stevedlawrence commented on a change in pull request #416: Throw SDE in the case of a choice with no branches
Posted by GitBox <gi...@apache.org>.
stevedlawrence commented on a change in pull request #416:
URL: https://github.com/apache/incubator-daffodil/pull/416#discussion_r487164831
##########
File path: daffodil-test/src/test/scala/org/apache/daffodil/section15/choice_groups/TestChoice.scala
##########
@@ -123,9 +124,6 @@ class TestChoice {
@Test def test_direct_dispatch_16(): Unit = { runnerCH.runOneTest("direct_dispatch_16") }
@Test def test_direct_dispatch_17(): Unit = { runnerCH.runOneTest("direct_dispatch_17") }
- //@Test def test_choice_noBranch() { runnerCH.runOneTest("choice_noBranch") } - Test consumes no data, which causes a TDMLError
-
-
Review comment:
Gotcha. I suspect this was originally split out beause it's not a valid schema and in some cases that can cause issues. But since it doesn't, seems reasonable to put it along side the other schemas. This change is fine with me.
----------------------------------------------------------------
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
[GitHub] [incubator-daffodil] rsteinberger commented on a change in pull request #416: Throw SDE in the case of a choice with no branches
Posted by GitBox <gi...@apache.org>.
rsteinberger commented on a change in pull request #416:
URL: https://github.com/apache/incubator-daffodil/pull/416#discussion_r487145919
##########
File path: daffodil-test/src/test/scala/org/apache/daffodil/section15/choice_groups/TestChoice.scala
##########
@@ -123,9 +124,6 @@ class TestChoice {
@Test def test_direct_dispatch_16(): Unit = { runnerCH.runOneTest("direct_dispatch_16") }
@Test def test_direct_dispatch_17(): Unit = { runnerCH.runOneTest("direct_dispatch_17") }
- //@Test def test_choice_noBranch() { runnerCH.runOneTest("choice_noBranch") } - Test consumes no data, which causes a TDMLError
-
-
Review comment:
I didn't see the point of using the external xsd. I can changes the name if you like.
##########
File path: daffodil-test/src/test/scala/org/apache/daffodil/section15/choice_groups/TestChoice.scala
##########
@@ -123,9 +124,6 @@ class TestChoice {
@Test def test_direct_dispatch_16(): Unit = { runnerCH.runOneTest("direct_dispatch_16") }
@Test def test_direct_dispatch_17(): Unit = { runnerCH.runOneTest("direct_dispatch_17") }
- //@Test def test_choice_noBranch() { runnerCH.runOneTest("choice_noBranch") } - Test consumes no data, which causes a TDMLError
-
-
Review comment:
I renamed it and move it to the basic model.
##########
File path: daffodil-core/src/main/scala/org/apache/daffodil/dsom/ChoiceGroup.scala
##########
@@ -201,6 +202,12 @@ abstract class ChoiceTermBase(
}
}.value
+ final lazy val noBranchesFound = LV('noBranchesFound) {
+ if(groupMembers.size.equals(0)) {
Review comment:
Done
##########
File path: daffodil-test/src/test/scala/org/apache/daffodil/section15/choice_groups/TestChoice.scala
##########
@@ -38,6 +38,9 @@ class TestChoice {
import TestChoice._
+ @Test def test_choice_noBranch (): Unit = { runnerCH.runOneTest("choice_noBranch") }
+
+ @Test def test_optionalChoice00(): Unit = { runnerCH.runOneTest("optionalChoice00") }
Review comment:
Yep, thanks John.
##########
File path: daffodil-test/src/test/scala/org/apache/daffodil/section15/choice_groups/TestChoice.scala
##########
@@ -123,9 +124,6 @@ class TestChoice {
@Test def test_direct_dispatch_16(): Unit = { runnerCH.runOneTest("direct_dispatch_16") }
@Test def test_direct_dispatch_17(): Unit = { runnerCH.runOneTest("direct_dispatch_17") }
- //@Test def test_choice_noBranch() { runnerCH.runOneTest("choice_noBranch") } - Test consumes no data, which causes a TDMLError
-
-
Review comment:
I didn't see the point of using the external xsd. I can changes the name if you like.
##########
File path: daffodil-test/src/test/scala/org/apache/daffodil/section15/choice_groups/TestChoice.scala
##########
@@ -123,9 +124,6 @@ class TestChoice {
@Test def test_direct_dispatch_16(): Unit = { runnerCH.runOneTest("direct_dispatch_16") }
@Test def test_direct_dispatch_17(): Unit = { runnerCH.runOneTest("direct_dispatch_17") }
- //@Test def test_choice_noBranch() { runnerCH.runOneTest("choice_noBranch") } - Test consumes no data, which causes a TDMLError
-
-
Review comment:
I renamed it and move it to the basic model.
##########
File path: daffodil-core/src/main/scala/org/apache/daffodil/dsom/ChoiceGroup.scala
##########
@@ -201,6 +202,12 @@ abstract class ChoiceTermBase(
}
}.value
+ final lazy val noBranchesFound = LV('noBranchesFound) {
+ if(groupMembers.size.equals(0)) {
Review comment:
Done
##########
File path: daffodil-test/src/test/scala/org/apache/daffodil/section15/choice_groups/TestChoice.scala
##########
@@ -38,6 +38,9 @@ class TestChoice {
import TestChoice._
+ @Test def test_choice_noBranch (): Unit = { runnerCH.runOneTest("choice_noBranch") }
+
+ @Test def test_optionalChoice00(): Unit = { runnerCH.runOneTest("optionalChoice00") }
Review comment:
Yep, thanks John.
##########
File path: daffodil-test/src/test/scala/org/apache/daffodil/section15/choice_groups/TestChoice.scala
##########
@@ -123,9 +124,6 @@ class TestChoice {
@Test def test_direct_dispatch_16(): Unit = { runnerCH.runOneTest("direct_dispatch_16") }
@Test def test_direct_dispatch_17(): Unit = { runnerCH.runOneTest("direct_dispatch_17") }
- //@Test def test_choice_noBranch() { runnerCH.runOneTest("choice_noBranch") } - Test consumes no data, which causes a TDMLError
-
-
Review comment:
I didn't see the point of using the external xsd. I can changes the name if you like.
##########
File path: daffodil-test/src/test/scala/org/apache/daffodil/section15/choice_groups/TestChoice.scala
##########
@@ -123,9 +124,6 @@ class TestChoice {
@Test def test_direct_dispatch_16(): Unit = { runnerCH.runOneTest("direct_dispatch_16") }
@Test def test_direct_dispatch_17(): Unit = { runnerCH.runOneTest("direct_dispatch_17") }
- //@Test def test_choice_noBranch() { runnerCH.runOneTest("choice_noBranch") } - Test consumes no data, which causes a TDMLError
-
-
Review comment:
I renamed it and move it to the basic model.
##########
File path: daffodil-core/src/main/scala/org/apache/daffodil/dsom/ChoiceGroup.scala
##########
@@ -201,6 +202,12 @@ abstract class ChoiceTermBase(
}
}.value
+ final lazy val noBranchesFound = LV('noBranchesFound) {
+ if(groupMembers.size.equals(0)) {
Review comment:
Done
##########
File path: daffodil-test/src/test/scala/org/apache/daffodil/section15/choice_groups/TestChoice.scala
##########
@@ -38,6 +38,9 @@ class TestChoice {
import TestChoice._
+ @Test def test_choice_noBranch (): Unit = { runnerCH.runOneTest("choice_noBranch") }
+
+ @Test def test_optionalChoice00(): Unit = { runnerCH.runOneTest("optionalChoice00") }
Review comment:
Yep, thanks John.
##########
File path: daffodil-test/src/test/scala/org/apache/daffodil/section15/choice_groups/TestChoice.scala
##########
@@ -123,9 +124,6 @@ class TestChoice {
@Test def test_direct_dispatch_16(): Unit = { runnerCH.runOneTest("direct_dispatch_16") }
@Test def test_direct_dispatch_17(): Unit = { runnerCH.runOneTest("direct_dispatch_17") }
- //@Test def test_choice_noBranch() { runnerCH.runOneTest("choice_noBranch") } - Test consumes no data, which causes a TDMLError
-
-
Review comment:
I didn't see the point of using the external xsd. I can changes the name if you like.
##########
File path: daffodil-test/src/test/scala/org/apache/daffodil/section15/choice_groups/TestChoice.scala
##########
@@ -123,9 +124,6 @@ class TestChoice {
@Test def test_direct_dispatch_16(): Unit = { runnerCH.runOneTest("direct_dispatch_16") }
@Test def test_direct_dispatch_17(): Unit = { runnerCH.runOneTest("direct_dispatch_17") }
- //@Test def test_choice_noBranch() { runnerCH.runOneTest("choice_noBranch") } - Test consumes no data, which causes a TDMLError
-
-
Review comment:
I renamed it and move it to the basic model.
##########
File path: daffodil-core/src/main/scala/org/apache/daffodil/dsom/ChoiceGroup.scala
##########
@@ -201,6 +202,12 @@ abstract class ChoiceTermBase(
}
}.value
+ final lazy val noBranchesFound = LV('noBranchesFound) {
+ if(groupMembers.size.equals(0)) {
Review comment:
Done
##########
File path: daffodil-test/src/test/scala/org/apache/daffodil/section15/choice_groups/TestChoice.scala
##########
@@ -38,6 +38,9 @@ class TestChoice {
import TestChoice._
+ @Test def test_choice_noBranch (): Unit = { runnerCH.runOneTest("choice_noBranch") }
+
+ @Test def test_optionalChoice00(): Unit = { runnerCH.runOneTest("optionalChoice00") }
Review comment:
Yep, thanks John.
##########
File path: daffodil-test/src/test/scala/org/apache/daffodil/section15/choice_groups/TestChoice.scala
##########
@@ -123,9 +124,6 @@ class TestChoice {
@Test def test_direct_dispatch_16(): Unit = { runnerCH.runOneTest("direct_dispatch_16") }
@Test def test_direct_dispatch_17(): Unit = { runnerCH.runOneTest("direct_dispatch_17") }
- //@Test def test_choice_noBranch() { runnerCH.runOneTest("choice_noBranch") } - Test consumes no data, which causes a TDMLError
-
-
Review comment:
I didn't see the point of using the external xsd. I can changes the name if you like.
##########
File path: daffodil-test/src/test/scala/org/apache/daffodil/section15/choice_groups/TestChoice.scala
##########
@@ -123,9 +124,6 @@ class TestChoice {
@Test def test_direct_dispatch_16(): Unit = { runnerCH.runOneTest("direct_dispatch_16") }
@Test def test_direct_dispatch_17(): Unit = { runnerCH.runOneTest("direct_dispatch_17") }
- //@Test def test_choice_noBranch() { runnerCH.runOneTest("choice_noBranch") } - Test consumes no data, which causes a TDMLError
-
-
Review comment:
I renamed it and move it to the basic model.
##########
File path: daffodil-core/src/main/scala/org/apache/daffodil/dsom/ChoiceGroup.scala
##########
@@ -201,6 +202,12 @@ abstract class ChoiceTermBase(
}
}.value
+ final lazy val noBranchesFound = LV('noBranchesFound) {
+ if(groupMembers.size.equals(0)) {
Review comment:
Done
##########
File path: daffodil-test/src/test/scala/org/apache/daffodil/section15/choice_groups/TestChoice.scala
##########
@@ -38,6 +38,9 @@ class TestChoice {
import TestChoice._
+ @Test def test_choice_noBranch (): Unit = { runnerCH.runOneTest("choice_noBranch") }
+
+ @Test def test_optionalChoice00(): Unit = { runnerCH.runOneTest("optionalChoice00") }
Review comment:
Yep, thanks John.
----------------------------------------------------------------
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
[GitHub] [incubator-daffodil] stevedlawrence commented on a change in pull request #416: Throw SDE in the case of a choice with no branches
Posted by GitBox <gi...@apache.org>.
stevedlawrence commented on a change in pull request #416:
URL: https://github.com/apache/incubator-daffodil/pull/416#discussion_r487076908
##########
File path: daffodil-test/src/test/scala/org/apache/daffodil/section15/choice_groups/TestChoice.scala
##########
@@ -123,9 +124,6 @@ class TestChoice {
@Test def test_direct_dispatch_16(): Unit = { runnerCH.runOneTest("direct_dispatch_16") }
@Test def test_direct_dispatch_17(): Unit = { runnerCH.runOneTest("direct_dispatch_17") }
- //@Test def test_choice_noBranch() { runnerCH.runOneTest("choice_noBranch") } - Test consumes no data, which causes a TDMLError
-
-
Review comment:
Why did you delete the choice_noBranch test and replace it with a new one? Was something wrong with choice_noBranch? That name feels more appropriate than optionalChoice00, since this isn't testing optional choices.
##########
File path: daffodil-core/src/main/scala/org/apache/daffodil/dsom/ChoiceGroup.scala
##########
@@ -201,6 +202,12 @@ abstract class ChoiceTermBase(
}
}.value
+ final lazy val noBranchesFound = LV('noBranchesFound) {
+ if(groupMembers.size.equals(0)) {
Review comment:
The standard in scala is to use ``==`` instead of ``.equals()``. Also note that there should be a space between ``if`` and the open paren.
----------------------------------------------------------------
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
[GitHub] [incubator-daffodil] stevedlawrence commented on a change in pull request #416: Throw SDE in the case of a choice with no branches
Posted by GitBox <gi...@apache.org>.
stevedlawrence commented on a change in pull request #416:
URL: https://github.com/apache/incubator-daffodil/pull/416#discussion_r487076908
##########
File path: daffodil-test/src/test/scala/org/apache/daffodil/section15/choice_groups/TestChoice.scala
##########
@@ -123,9 +124,6 @@ class TestChoice {
@Test def test_direct_dispatch_16(): Unit = { runnerCH.runOneTest("direct_dispatch_16") }
@Test def test_direct_dispatch_17(): Unit = { runnerCH.runOneTest("direct_dispatch_17") }
- //@Test def test_choice_noBranch() { runnerCH.runOneTest("choice_noBranch") } - Test consumes no data, which causes a TDMLError
-
-
Review comment:
Why did you delete the choice_noBranch test and replace it with a new one? Was something wrong with choice_noBranch? That name feels more appropriate than optionalChoice00, since this isn't testing optional choices.
##########
File path: daffodil-core/src/main/scala/org/apache/daffodil/dsom/ChoiceGroup.scala
##########
@@ -201,6 +202,12 @@ abstract class ChoiceTermBase(
}
}.value
+ final lazy val noBranchesFound = LV('noBranchesFound) {
+ if(groupMembers.size.equals(0)) {
Review comment:
The standard in scala is to use ``==`` instead of ``.equals()``. Also note that there should be a space between ``if`` and the open paren.
##########
File path: daffodil-test/src/test/scala/org/apache/daffodil/section15/choice_groups/TestChoice.scala
##########
@@ -123,9 +124,6 @@ class TestChoice {
@Test def test_direct_dispatch_16(): Unit = { runnerCH.runOneTest("direct_dispatch_16") }
@Test def test_direct_dispatch_17(): Unit = { runnerCH.runOneTest("direct_dispatch_17") }
- //@Test def test_choice_noBranch() { runnerCH.runOneTest("choice_noBranch") } - Test consumes no data, which causes a TDMLError
-
-
Review comment:
Gotcha. I suspect this was originally split out beause it's not a valid schema and in some cases that can cause issues. But since it doesn't, seems reasonable to put it along side the other schemas. This change is fine with me.
##########
File path: daffodil-test/src/test/scala/org/apache/daffodil/section15/choice_groups/TestChoice.scala
##########
@@ -123,9 +124,6 @@ class TestChoice {
@Test def test_direct_dispatch_16(): Unit = { runnerCH.runOneTest("direct_dispatch_16") }
@Test def test_direct_dispatch_17(): Unit = { runnerCH.runOneTest("direct_dispatch_17") }
- //@Test def test_choice_noBranch() { runnerCH.runOneTest("choice_noBranch") } - Test consumes no data, which causes a TDMLError
-
-
Review comment:
Why did you delete the choice_noBranch test and replace it with a new one? Was something wrong with choice_noBranch? That name feels more appropriate than optionalChoice00, since this isn't testing optional choices.
##########
File path: daffodil-core/src/main/scala/org/apache/daffodil/dsom/ChoiceGroup.scala
##########
@@ -201,6 +202,12 @@ abstract class ChoiceTermBase(
}
}.value
+ final lazy val noBranchesFound = LV('noBranchesFound) {
+ if(groupMembers.size.equals(0)) {
Review comment:
The standard in scala is to use ``==`` instead of ``.equals()``. Also note that there should be a space between ``if`` and the open paren.
##########
File path: daffodil-test/src/test/scala/org/apache/daffodil/section15/choice_groups/TestChoice.scala
##########
@@ -123,9 +124,6 @@ class TestChoice {
@Test def test_direct_dispatch_16(): Unit = { runnerCH.runOneTest("direct_dispatch_16") }
@Test def test_direct_dispatch_17(): Unit = { runnerCH.runOneTest("direct_dispatch_17") }
- //@Test def test_choice_noBranch() { runnerCH.runOneTest("choice_noBranch") } - Test consumes no data, which causes a TDMLError
-
-
Review comment:
Gotcha. I suspect this was originally split out beause it's not a valid schema and in some cases that can cause issues. But since it doesn't, seems reasonable to put it along side the other schemas. This change is fine with me.
##########
File path: daffodil-test/src/test/scala/org/apache/daffodil/section15/choice_groups/TestChoice.scala
##########
@@ -123,9 +124,6 @@ class TestChoice {
@Test def test_direct_dispatch_16(): Unit = { runnerCH.runOneTest("direct_dispatch_16") }
@Test def test_direct_dispatch_17(): Unit = { runnerCH.runOneTest("direct_dispatch_17") }
- //@Test def test_choice_noBranch() { runnerCH.runOneTest("choice_noBranch") } - Test consumes no data, which causes a TDMLError
-
-
Review comment:
Why did you delete the choice_noBranch test and replace it with a new one? Was something wrong with choice_noBranch? That name feels more appropriate than optionalChoice00, since this isn't testing optional choices.
##########
File path: daffodil-core/src/main/scala/org/apache/daffodil/dsom/ChoiceGroup.scala
##########
@@ -201,6 +202,12 @@ abstract class ChoiceTermBase(
}
}.value
+ final lazy val noBranchesFound = LV('noBranchesFound) {
+ if(groupMembers.size.equals(0)) {
Review comment:
The standard in scala is to use ``==`` instead of ``.equals()``. Also note that there should be a space between ``if`` and the open paren.
##########
File path: daffodil-test/src/test/scala/org/apache/daffodil/section15/choice_groups/TestChoice.scala
##########
@@ -123,9 +124,6 @@ class TestChoice {
@Test def test_direct_dispatch_16(): Unit = { runnerCH.runOneTest("direct_dispatch_16") }
@Test def test_direct_dispatch_17(): Unit = { runnerCH.runOneTest("direct_dispatch_17") }
- //@Test def test_choice_noBranch() { runnerCH.runOneTest("choice_noBranch") } - Test consumes no data, which causes a TDMLError
-
-
Review comment:
Gotcha. I suspect this was originally split out beause it's not a valid schema and in some cases that can cause issues. But since it doesn't, seems reasonable to put it along side the other schemas. This change is fine with me.
----------------------------------------------------------------
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