Conversions for dpath comparisons fixed so they convert args.

Test case is test_dfdl_1669_unsignedLong_conversion.

Centralized all 3 NodeInfo type generalizers into NodeInfoUtils.

DFDL-1669
diff --git a/daffodil-core/src/main/scala/edu/illinois/ncsa/daffodil/dpath/Expression.scala b/daffodil-core/src/main/scala/edu/illinois/ncsa/daffodil/dpath/Expression.scala
index c8d8cfc..2fe900e 100644
--- a/daffodil-core/src/main/scala/edu/illinois/ncsa/daffodil/dpath/Expression.scala
+++ b/daffodil-core/src/main/scala/edu/illinois/ncsa/daffodil/dpath/Expression.scala
@@ -392,23 +392,23 @@
 
   override def targetTypeForSubexpression(child: Expression): NodeInfo.Kind = convergedArgType
 
-  lazy val (convergedArgType, _) = (left.inherentType, right.inherentType) match {
+  lazy val convergedArgType = (left.inherentType, right.inherentType) match {
     // String => Numeric conversions are not allowed for comparison Ops.
     //
     // See http://www.w3.org/TR/xpath20/#mapping
     //
     case (left: NodeInfo.String.Kind, right: NodeInfo.String.Kind) =>
-      (NodeInfo.String, NodeInfo.String)
+      NodeInfo.String
     case (left: NodeInfo.Numeric.Kind, right: NodeInfo.Numeric.Kind) =>
-      Conversion.numericBinaryOpTargetTypes(op, left, right)
+      NodeInfoUtils.generalizeArgTypesForComparisonOp(op, left, right)
     case (left: NodeInfo.Date.Kind, right: NodeInfo.Date.Kind) =>
-      (NodeInfo.Date, NodeInfo.Date)
+      NodeInfo.Date
     case (left: NodeInfo.Time.Kind, right: NodeInfo.Time.Kind) =>
-      (NodeInfo.Time, NodeInfo.Time)
+      NodeInfo.Time
     case (left: NodeInfo.DateTime.Kind, right: NodeInfo.DateTime.Kind) =>
-      (NodeInfo.DateTime, NodeInfo.DateTime)
+      NodeInfo.DateTime
     case (left: NodeInfo.Boolean.Kind, right: NodeInfo.Boolean.Kind) =>
-      (NodeInfo.Boolean, NodeInfo.Boolean)
+      NodeInfo.Boolean
     case (l, r) =>
       SDE("Cannot compare %s with %s for operator '%s'", l, r, op)
   }
@@ -540,7 +540,7 @@
 
   lazy val (convergedArgType, convergedResult) = (left.inherentType, right.inherentType) match {
     case (left: NodeInfo.Numeric.Kind, right: NodeInfo.Numeric.Kind) =>
-      Conversion.numericBinaryOpTargetTypes(op, left, right)
+      NodeInfoUtils.generalizeArgAndResultTypesForNumericOp(op, left, right)
     case (left: NodeInfo.Numeric.Kind, r) =>
       SDE("Right operand for operator '%s' must have numeric type. Type was: %s.", op, r)
     case (l, r: NodeInfo.Numeric.Kind) =>
@@ -614,7 +614,7 @@
     // we need the type which is the generalization of the thenPart and
     // elsePart inherent types, but it's an error if they have no generalization.
     //
-    NodeInfoUtils.generalize(thenPart, elsePart)
+    NodeInfoUtils.generalizeIfThenElse(thenPart, elsePart)
   }
 }
 
@@ -1842,7 +1842,7 @@
   extends FNTwoArgsExprBase(nameAsParsed, fnQName, args, resultType, arg1Type, arg2Type, constructor) {
 
   protected final def leafReferencedElements = {
-       val arg = args(0).asInstanceOf[PathExpression]
+    val arg = args(0).asInstanceOf[PathExpression]
     val steps = arg.steps
     val lst = steps.last
     val elem = lst.stepElement
@@ -1857,16 +1857,15 @@
   constructor: List[CompiledDPath] => RecipeOp)
   extends LengthExprBase(nameAsParsed, fnQName, args, resultType, arg1Type, arg2Type, constructor) {
 
-    override lazy val leafContentLengthReferencedElements = leafReferencedElements
+  override lazy val leafContentLengthReferencedElements = leafReferencedElements
 }
 
-
 case class ValueLengthExpr(nameAsParsed: String, fnQName: RefQName,
   args: List[Expression], resultType: NodeInfo.Kind, arg1Type: NodeInfo.Kind, arg2Type: NodeInfo.Kind,
   constructor: List[CompiledDPath] => RecipeOp)
   extends LengthExprBase(nameAsParsed, fnQName, args, resultType, arg1Type, arg2Type, constructor) {
 
-    override lazy val leafValueLengthReferencedElements = leafReferencedElements
+  override lazy val leafValueLengthReferencedElements = leafReferencedElements
 }
 
 case class FNThreeArgsExpr(nameAsParsed: String, fnQName: RefQName,
diff --git a/daffodil-core/src/main/scala/edu/illinois/ncsa/daffodil/dpath/NodeInfoUtils.scala b/daffodil-core/src/main/scala/edu/illinois/ncsa/daffodil/dpath/NodeInfoUtils.scala
index c01d180..4832871 100644
--- a/daffodil-core/src/main/scala/edu/illinois/ncsa/daffodil/dpath/NodeInfoUtils.scala
+++ b/daffodil-core/src/main/scala/edu/illinois/ncsa/daffodil/dpath/NodeInfoUtils.scala
@@ -1,4 +1,4 @@
-/* Copyright (c) 2012-2014 Tresys Technology, LLC. All rights reserved.
+/* Copyright (c) 2012-2016 Tresys Technology, LLC. All rights reserved.
  *
  * Developed by: Tresys Technology, LLC
  *               http://www.tresys.com
@@ -32,31 +32,125 @@
 
 package edu.illinois.ncsa.daffodil.dpath
 
+import edu.illinois.ncsa.daffodil.exceptions.Assert
+
+import NodeInfo._
+
 object NodeInfoUtils {
+
   /**
-   * When operating on two operands, this computes the type to which
-   * they are mutually converted before the operation. Such as if you
-   * add an Int and a Double, the Int is converted to Double before adding, and
-   * the result type is Double.
+   * Generalizes the type of the two alternatives of an if-then-else
    */
-  def generalize(aExpr: Expression, bExpr: Expression): NodeInfo.Kind = {
-    val a = aExpr.inherentType
-    val b = bExpr.inherentType
+  def generalizeIfThenElse(thenExpr: Expression, elseExpr: Expression): NodeInfo.Kind = {
+    val a = thenExpr.inherentType
+    val b = elseExpr.inherentType
     if (a == b) a
     else if (a.isSubtypeOf(b)) b
     else if (b.isSubtypeOf(a)) a
     else
       (a, b) match {
-        case (s: NodeInfo.String.Kind, _) => NodeInfo.String
-        case (_, s: NodeInfo.String.Kind) => NodeInfo.String
-        case (NodeInfo.Float, NodeInfo.Double) => NodeInfo.Double
-        case (NodeInfo.Double, NodeInfo.Float) => NodeInfo.Double
-        case (NodeInfo.Decimal, NodeInfo.Double) => NodeInfo.Decimal
-        case (NodeInfo.Double, NodeInfo.Decimal) => NodeInfo.Decimal
-        case (NodeInfo.Boolean, bt: NodeInfo.Numeric.Kind) => bt
-        case (bt: NodeInfo.Numeric.Kind, NodeInfo.Boolean) => bt
-        case (it: NodeInfo.Long.Kind, NodeInfo.ArrayIndex) => NodeInfo.ArrayIndex
-        case _ => aExpr.SDE("Static type error: expressions '%s' and '%s' have incompatible types %s and %s.", aExpr.text, bExpr.text, a, b)
+        case (s: String.Kind, _) => String
+        case (_, s: String.Kind) => String
+        case (Float, Double) => Double
+        case (Double, Float) => Double
+        case (Decimal, Double) => Decimal
+        case (Double, Decimal) => Decimal
+        case (Boolean, bt: Numeric.Kind) => bt
+        case (bt: Numeric.Kind, Boolean) => bt
+        case (it: Long.Kind, ArrayIndex) => ArrayIndex
+        case _ => thenExpr.SDE("Static type error: expressions '%s' and '%s' have incompatible types %s and %s.", thenExpr.text, elseExpr.text, a, b)
       }
   }
-}
\ No newline at end of file
+
+  /**
+   * For a comparison operator, compute type to which the args should be converted
+   */
+  def generalizeArgTypesForComparisonOp(op: String,
+    inherent1: Numeric.Kind,
+    inherent2: Numeric.Kind): Numeric.Kind = {
+
+    val argType: Numeric.Kind = (inherent1, inherent2) match {
+      case (x, y) if (x eq y) => x
+      case (_, Decimal) => Decimal
+      case (Decimal, _) => Decimal
+      case (_, Double) => Double
+      case (Double, _) => Double
+      case (_, Float) => Double
+      case (Float, _) => Double
+      case (_, Integer) => Integer
+      case (Integer, _) => Integer
+      case (_, NonNegativeInteger) => Integer
+      case (NonNegativeInteger, _) => Integer
+      case (_: UnsignedLong.Kind, UnsignedLong) => UnsignedLong
+      case (UnsignedLong, _: UnsignedLong.Kind) => UnsignedLong
+      case (_, UnsignedLong) => Integer
+      case (UnsignedLong, _) => Integer
+      case (_, ArrayIndex) => ArrayIndex
+      case (ArrayIndex, _) => ArrayIndex
+      case (_, Long) => Long
+      case (Long, _) => Long
+      case (_, UnsignedInt) => Long
+      case (UnsignedInt, _) => Long
+      case (_, Int) => Int
+      case (Int, _) => Int
+      case (_, UnsignedShort) => Int
+      case (UnsignedShort, _) => Int
+      case (_, Short) => Short
+      case (Short, _) => Short
+      case (_, UnsignedByte) => Short
+      case (UnsignedByte, _) => Short
+      case (_, Byte) => Byte
+      case (Byte, _) => Byte
+      case _ => Assert.usageError(
+        "Unsupported types for comparison op '%s' were %s and %s.".format(op, inherent1, inherent2))
+    }
+    argType
+  }
+
+  /**
+   * For a numeric operation, compute types the args should be converted to, and the resulting type
+   * from the operation on them.
+   */
+  def generalizeArgAndResultTypesForNumericOp(op: String,
+    inherent1: Numeric.Kind,
+    inherent2: Numeric.Kind): (Numeric.Kind, Numeric.Kind) = {
+    /*
+     * Adjust for the Decimal result type when div is used on any integer types.
+     */
+    def divResult(t: NodeInfo.Numeric.Kind) =
+      if (op == "div") Decimal else t
+    val (argType: Numeric.Kind, resultType: Numeric.Kind) = (inherent1, inherent2) match {
+      case (_, Decimal) => (Decimal, Decimal)
+      case (Decimal, _) => (Decimal, Decimal)
+      case (_, Double) => (Double, Double)
+      case (Double, _) => (Double, Double)
+      case (_, Float) => (Double, Double)
+      case (Float, _) => (Double, Double)
+      case (_, Integer) => (Integer, divResult(Integer))
+      case (Integer, _) => (Integer, divResult(Integer))
+      case (_, NonNegativeInteger) => (NonNegativeInteger, divResult(Integer))
+      case (NonNegativeInteger, _) => (NonNegativeInteger, divResult(Integer))
+      case (_, UnsignedLong) => (UnsignedLong, divResult(Integer))
+      case (UnsignedLong, _) => (UnsignedLong, divResult(Integer))
+      case (_, ArrayIndex) => (ArrayIndex, ArrayIndex)
+      case (ArrayIndex, _) => (ArrayIndex, ArrayIndex)
+      case (_, Long) => (Long, divResult(Long))
+      case (Long, _) => (Long, divResult(Long))
+      case (_, UnsignedInt) => (UnsignedInt, divResult(Long))
+      case (UnsignedInt, _) => (UnsignedInt, divResult(Long))
+      case (_, Int) => (Int, divResult(Int))
+      case (Int, _) => (Int, divResult(Int))
+      case (_, UnsignedShort) => (UnsignedShort, divResult(Int))
+      case (UnsignedShort, _) => (UnsignedShort, divResult(Int))
+      case (_, Short) => (Short, divResult(Int))
+      case (Short, _) => (Short, divResult(Int))
+      case (_, UnsignedByte) => (UnsignedByte, divResult(Int))
+      case (UnsignedByte, _) => (UnsignedByte, divResult(Int))
+      case (_, Byte) => (Byte, divResult(Int))
+      case (Byte, _) => (Byte, divResult(Int))
+      case _ => Assert.usageError(
+        "Unsupported types for numeric op '%s' were %s and %s.".format(op, inherent1, inherent2))
+    }
+    (argType, resultType)
+  }
+}
diff --git a/daffodil-runtime1/src/main/scala/edu/illinois/ncsa/daffodil/dpath/Conversions.scala b/daffodil-runtime1/src/main/scala/edu/illinois/ncsa/daffodil/dpath/Conversions.scala
index 5b668f4..b899971 100644
--- a/daffodil-runtime1/src/main/scala/edu/illinois/ncsa/daffodil/dpath/Conversions.scala
+++ b/daffodil-runtime1/src/main/scala/edu/illinois/ncsa/daffodil/dpath/Conversions.scala
@@ -2,25 +2,25 @@
  *
  * Developed by: Tresys Technology, LLC
  *               http://www.tresys.com
- * 
+ *
  * Permission is hereby granted, free of charge, to any person obtaining a copy of
  * this software and associated documentation files (the "Software"), to deal with
  * the Software without restriction, including without limitation the rights to
  * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
  * of the Software, and to permit persons to whom the Software is furnished to do
  * so, subject to the following conditions:
- * 
+ *
  *  1. Redistributions of source code must retain the above copyright notice,
  *     this list of conditions and the following disclaimers.
- * 
+ *
  *  2. Redistributions in binary form must reproduce the above copyright
  *     notice, this list of conditions and the following disclaimers in the
  *     documentation and/or other materials provided with the distribution.
- * 
+ *
  *  3. Neither the names of Tresys Technology, nor the names of its contributors
  *     may be used to endorse or promote products derived from this Software
  *     without specific prior written permission.
- * 
+ *
  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
  * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
  * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
@@ -32,7 +32,6 @@
 
 package edu.illinois.ncsa.daffodil.dpath
 
-import edu.illinois.ncsa.daffodil.exceptions.Assert
 import edu.illinois.ncsa.daffodil.exceptions.ThrowsSDE
 import java.text.ParsePosition
 import com.ibm.icu.util.Calendar
@@ -46,17 +45,17 @@
  * Casting chart taken from http://www.w3.org/TR/xpath-functions/#casting, with
  * types DFDL does not allow removed.
  *
- *  S\T   bool dat dbl dec dT  flt hxB int str tim 
- *  bool   Y    N   Y   Y   N   Y   N   Y   Y   N  
- *  dat    N    Y   N   N   Y   N   N   N   Y   N  
- *  dbl    Y    N   Y   M   N   Y   N   M   Y   N  
- *  dec    Y    N   Y   Y   N   Y   N   Y   Y   N  
- *  dT     N    Y   N   N   Y   N   N   N   Y   Y  
- *  flt    Y    N   Y   M   N   Y   N   M   Y   N  
- *  hxB    N    N   N   N   N   N   Y   N   Y   N  
- *  int    Y    N   Y   Y   N   Y   N   Y   Y   N  
- *  str    M    M   M   M   M   M   M   M   Y   M  
- *  tim    N    N   N   N   N   N   N   N   Y   Y  
+ *  S\T   bool dat dbl dec dT  flt hxB int str tim
+ *  bool   Y    N   Y   Y   N   Y   N   Y   Y   N
+ *  dat    N    Y   N   N   Y   N   N   N   Y   N
+ *  dbl    Y    N   Y   M   N   Y   N   M   Y   N
+ *  dec    Y    N   Y   Y   N   Y   N   Y   Y   N
+ *  dT     N    Y   N   N   Y   N   N   N   Y   Y
+ *  flt    Y    N   Y   M   N   Y   N   M   Y   N
+ *  hxB    N    N   N   N   N   N   Y   N   Y   N
+ *  int    Y    N   Y   Y   N   Y   N   Y   Y   N
+ *  str    M    M   M   M   M   M   M   M   Y   M
+ *  tim    N    N   N   N   N   N   N   N   Y   Y
  */
 
 object Conversion {
@@ -72,7 +71,7 @@
       case (_, Array) => Nil
       case (x, y) if (x == y) => Nil
       case (x, Nillable) => {
-        // we don't have enough information here to check whether the 
+        // we don't have enough information here to check whether the
         // item under scrutiny is nillable or not.
         Nil
       }
@@ -365,51 +364,4 @@
     val calendar = constructCalendar(value, inFormat, fncName, toType)
     DFDLTime(calendar, expectsTZ)
   }
-
-  /**
-   * Compute types the args should be converted to, and the resulting type
-   * from the operation on them.
-   */
-  def numericBinaryOpTargetTypes(op: String, inherent1: NodeInfo.Numeric.Kind, inherent2: NodeInfo.Numeric.Kind): (NodeInfo.Numeric.Kind, NodeInfo.Numeric.Kind) = {
-    import NodeInfo._
-    /*
-     * Adjust for the Decimal result type when div is used on any integer types.
-     */
-    def divResult(t: NodeInfo.Numeric.Kind) =
-      if (op == "div") Decimal else t
-    val (argType: Numeric.Kind, resultType: Numeric.Kind) = (inherent1, inherent2) match {
-      case (_, Decimal) => (Decimal, Decimal)
-      case (Decimal, _) => (Decimal, Decimal)
-      case (_, Double) => (Double, Double)
-      case (Double, _) => (Double, Double)
-      case (_, Float) => (Double, Double)
-      case (Float, _) => (Double, Double)
-      case (x, Integer) => (Integer, divResult(Integer))
-      case (Integer, x) => (Integer, divResult(Integer))
-      case (x, NonNegativeInteger) => (NonNegativeInteger, divResult(Integer))
-      case (NonNegativeInteger, x) => (NonNegativeInteger, divResult(Integer))
-      case (x, UnsignedLong) => (UnsignedLong, divResult(Integer))
-      case (UnsignedLong, x) => (UnsignedLong, divResult(Integer))
-      case (x, ArrayIndex) => (ArrayIndex, ArrayIndex)
-      case (ArrayIndex, x) => (ArrayIndex, ArrayIndex)
-      case (x, Long) => (Long, divResult(Long))
-      case (Long, x) => (Long, divResult(Long))
-      case (x, UnsignedInt) => (UnsignedInt, divResult(Long))
-      case (UnsignedInt, x) => (UnsignedInt, divResult(Long))
-      case (x, Int) => (Int, divResult(Int))
-      case (Int, x) => (Int, divResult(Int))
-      case (x, UnsignedShort) => (UnsignedShort, divResult(Int))
-      case (UnsignedShort, x) => (UnsignedShort, divResult(Int))
-      case (x, Short) => (Short, divResult(Int))
-      case (Short, x) => (Short, divResult(Int))
-      case (x, UnsignedByte) => (UnsignedByte, divResult(Int))
-      case (UnsignedByte, x) => (UnsignedByte, divResult(Int))
-      case (x, Byte) => (Byte, divResult(Int))
-      case (Byte, x) => (Byte, divResult(Int))
-      case _ => Assert.usageError(
-        "Unsupported types for op '%s' were %s and %s.".format(op, inherent1, inherent2))
-    }
-    (argType, resultType)
-  }
-
 }
diff --git a/daffodil-test/src/test/resources/edu/illinois/ncsa/daffodil/section23/dfdl_expressions/expressions2.tdml b/daffodil-test/src/test/resources/edu/illinois/ncsa/daffodil/section23/dfdl_expressions/expressions2.tdml
new file mode 100644
index 0000000..f4f4a19
--- /dev/null
+++ b/daffodil-test/src/test/resources/edu/illinois/ncsa/daffodil/section23/dfdl_expressions/expressions2.tdml
@@ -0,0 +1,98 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Copyright (c) 2012-2016 Tresys Technology, LLC. All rights reserved.
+
+ Developed by: Tresys Technology, LLC
+ http://www.tresys.com
+
+ Permission is hereby granted, free of charge, to any person obtaining a 
+ copy of
+ this software and associated documentation files (the "Software"), to deal 
+ with
+ the Software without restriction, including without limitation the rights 
+ to
+ use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
+ of the Software, and to permit persons to whom the Software is furnished 
+ to do
+ so, subject to the following conditions:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions and the following disclaimers.
+
+ 2. Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions and the following disclaimers in the
+ documentation and/or other materials provided with the distribution.
+
+ 3. Neither the names of Tresys Technology, nor the names of its contributors
+ may be used to endorse or promote products derived from this Software
+ without specific prior written permission.
+
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 
+ OR
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL 
+ THE
+ CONTRIBUTORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 
+ FROM,
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS WITH 
+ THE
+ SOFTWARE.
+-->
+<tdml:testSuite
+ suiteName="expressions2"
+ description="misc expression language tests"
+ 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:ex="http://example.com"
+ xmlns:daf="urn:ogf:dfdl:2013:imp:opensource.ncsa.illinois.edu:2012:ext"
+ xmlns:fn="http://www.w3.org/2005/xpath-functions"
+ defaultRoundTrip="true">
+
+ <tdml:defineSchema name="s1" 
+ elementFormDefault="unqualified"
+ >
+  <dfdl:format
+   ref="ex:daffodilTest1"
+   lengthKind="explicit" 
+   representation="binary" lengthUnits="bits"/>
+
+  <xs:element name="e1" dfdl:lengthKind="implicit">
+   <xs:complexType>
+    <xs:sequence>
+     <xs:element name="ul" type="xs:unsignedLong" dfdl:length="2" />
+     <!-- 
+     DFDL-1669, the comparison of ul and 1 would return false because it
+     was comparing a java.math.BigInteger with a java.lang.Long
+      -->
+      <xs:element name="comp" type="xs:int"
+       dfdl:inputValueCalc="{ if ( ../ul eq 1 ) then 1 else 0 }" />
+    </xs:sequence>
+   </xs:complexType>
+  </xs:element>
+
+ </tdml:defineSchema>
+
+ <tdml:parserTestCase
+  name="test_dfdl_1669_unsignedLong_conversion"
+  root="e1"
+  model="s1"
+  description="Show that unsignedLong element values get compared to literal integers properly."
+  roundTrip="false"
+ >
+
+  <tdml:document>
+  <tdml:documentPart type="bits">01</tdml:documentPart></tdml:document>
+  <tdml:infoset>
+  <tdml:dfdlInfoset>
+   <ex:e1 xmlns:ex="http://example.com">
+    <ul>1</ul>
+    <comp>1</comp>
+   </ex:e1>
+   </tdml:dfdlInfoset>
+  </tdml:infoset>
+ </tdml:parserTestCase>
+
+</tdml:testSuite>
diff --git a/daffodil-test/src/test/scala-new/edu/illinois/ncsa/daffodil/section23/dfdl_expressions/TestDFDLExpressionsNew.scala b/daffodil-test/src/test/scala-new/edu/illinois/ncsa/daffodil/section23/dfdl_expressions/TestDFDLExpressionsNew.scala
index 9167d14..c61f3a3 100644
--- a/daffodil-test/src/test/scala-new/edu/illinois/ncsa/daffodil/section23/dfdl_expressions/TestDFDLExpressionsNew.scala
+++ b/daffodil-test/src/test/scala-new/edu/illinois/ncsa/daffodil/section23/dfdl_expressions/TestDFDLExpressionsNew.scala
@@ -54,14 +54,19 @@
   val tdml2 = testDir + "functions.tdml"
   lazy val runner_fun = new DFDLTestSuite(Misc.getRequiredResource(tdml2))
 
-
   val testDir4 = "/edu/illinois/ncsa/daffodil/section23/dfdl_expressions/"
   val tdml4 = testDir4 + "expressions.tdml"
   lazy val runner4 = new DFDLTestSuite(Misc.getRequiredResource(tdml4))
 
+  val tdml5 = testDir4 + "expressions2.tdml"
+  lazy val runner5 = new DFDLTestSuite(Misc.getRequiredResource(tdml5))
+
   //DFDL-1076
   @Test def test_nilled_01() { runner2.runOneTest("nilled_01") }
   //DFDL-1233
   @Test def test_nilled_02() { runner2.runOneTest("nilled_02") }
   @Test def test_nilled_03() { runner2.runOneTest("nilled_03") }
+
+  // DFDL-1669
+  @Test def test_dfdl_1669_unsignedLong_conversion() { runner5.runOneTest("test_dfdl_1669_unsignedLong_conversion") }
 }