From f34ffd172ed378f00a17b3c5cdd685d5985a5a09 Mon Sep 17 00:00:00 2001 From: olabusayoT <50379531+olabusayoT@users.noreply.github.com> Date: Sun, 13 Oct 2024 18:00:57 -0400 Subject: [PATCH] Verify OVC reports data too long error as necessary - currently we have no tests that try to OVC into a too small element. This PR adds in such a test. DAFFODIL-1595 --- .../outputValueCalc.tdml | 27 +++++++++++++++++++ .../TestOutputValueCalc.scala | 3 +++ 2 files changed, 30 insertions(+) diff --git a/daffodil-test/src/test/resources/org/apache/daffodil/section17/calc_value_properties/outputValueCalc.tdml b/daffodil-test/src/test/resources/org/apache/daffodil/section17/calc_value_properties/outputValueCalc.tdml index aa3e76d709..f72a890406 100644 --- a/daffodil-test/src/test/resources/org/apache/daffodil/section17/calc_value_properties/outputValueCalc.tdml +++ b/daffodil-test/src/test/resources/org/apache/daffodil/section17/calc_value_properties/outputValueCalc.tdml @@ -362,6 +362,16 @@ + + + + + + + + 1219 + + + + + + + + + + Unparse Error + data too long + truncate + + + diff --git a/daffodil-test/src/test/scala/org/apache/daffodil/section17/calc_value_properties/TestOutputValueCalc.scala b/daffodil-test/src/test/scala/org/apache/daffodil/section17/calc_value_properties/TestOutputValueCalc.scala index d1868ee3a5..f903e42a4a 100644 --- a/daffodil-test/src/test/scala/org/apache/daffodil/section17/calc_value_properties/TestOutputValueCalc.scala +++ b/daffodil-test/src/test/scala/org/apache/daffodil/section17/calc_value_properties/TestOutputValueCalc.scala @@ -121,4 +121,7 @@ class TestOutputValueCalc { // DAFFODIL-2167 @Test def test_arrayWithFollowingOVC(): Unit = { runner.runOneTest("arrayWithFollowingOVC") } + + // DAFFODIL-1595 + @Test def test_OVCTooLargeForElem(): Unit = { runner.runOneTest("OVCTooLargeForElem") } }