daffodil-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From GitBox <...@apache.org>
Subject [GitHub] [daffodil] Samarth08 commented on a change in pull request #550: Daffodil-2473 [WIP]
Date Tue, 04 May 2021 19:18:29 GMT

Samarth08 commented on a change in pull request #550:
URL: https://github.com/apache/daffodil/pull/550#discussion_r626041296



##########
File path: daffodil-test/src/test/resources/org/apache/daffodil/section23/dfdl_functions/BitFunctions.tdml
##########
@@ -0,0 +1,56 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  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.
+-->
+
+<tdml:testSuite suiteName="SimpleTypes" description="Section 5 - simple types"
+  xmlns:dfdlx="http://www.ogf.org/dfdl/dfdl-1.0/extensions"
+  xmlns:tdml="http://www.ibm.com/xmlns/dfdl/testData" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+  xmlns:dfdl="http://www.ogf.org/dfdl/dfdl-1.0/" xmlns:xs="http://www.w3.org/2001/XMLSchema"
+  xmlns:fn="http://www.w3.org/2005/xpath-functions"
+  xmlns:math="http://www.w3.org/2005/xpath-functions/math"
+  xmlns:ex="http://example.com"
+  xmlns:home="http://home.com"
+  xmlns:first="http://first.com"
+  defaultRoundTrip="onePass">
+  <tdml:defineSchema elementFormDefault="unqualified" name="BitFunctions">
+    <xs:include schemaLocation="org/apache/daffodil/xsd/DFDLGeneralFormat.dfdl.xsd"/>
+    <dfdl:format ref="ex:GeneralFormat"/>
+        <xs:element name="leftInt">
+          <xs:complexType>
+            <xs:sequence dfdl:separator=",">
+              <xs:element name="num" type="xs:int" dfdl:lengthKind="delimited"/>
+              <xs:element name="count" type="xs:int" dfdl:lengthKind="delimited"/>
+              <xs:element name="value" type="xs:int" dfdl:inputValueCalc="{dfdlx:leftShift(../num,../count)}"/>
+            </xs:sequence>
+          </xs:complexType>
+        </xs:element>
+  </tdml:defineSchema>
+  <tdml:parserTestCase name="leftShift_int_01" root="leftInt" model="BitFunctions">
+              <tdml:document>

Review comment:
       Thank you @mbeckerle it passed after removing the white spaces.Let me know what else
I need to change before proceeding to other operators.Also for negative test cases do I have
to add another .tdml file?




-- 
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



Mime
View raw message