Merge branch 'master' into westmann/testcleanup
diff --git a/asterix-app/src/test/resources/runtimets/queries/types/type_promotion_1/type_promotion_1.1.ddl.aql b/asterix-app/src/test/resources/runtimets/queries/types/type_promotion_1/type_promotion_1.1.ddl.aql
new file mode 100644
index 0000000..6aa28cc
--- /dev/null
+++ b/asterix-app/src/test/resources/runtimets/queries/types/type_promotion_1/type_promotion_1.1.ddl.aql
@@ -0,0 +1,22 @@
+drop dataverse TestDataverse if exists;
+create dataverse TestDataverse;
+use dataverse TestDataverse;
+
+create type TestType as {
+  id: int64,
+  int8_u:   {{ int8   }},
+  int8_o:   [  int8    ],
+  int16_u:  {{ int16  }},
+  int16_o:  [  int16   ],
+  int32_u:  {{ int32  }},
+  int32_o:  [  int32   ],
+  int64_u:  {{ int64  }},
+  int64_o:  [  int64   ],
+  float_u:  {{ float  }},
+  float_o:  [  float   ],
+  double_u: {{ double }},
+  double_o: [  double  ]
+}
+
+create dataset TestSet(TestType)
+primary key id;
diff --git a/asterix-app/src/test/resources/runtimets/queries/types/type_promotion_1/type_promotion_1.2.update.aql b/asterix-app/src/test/resources/runtimets/queries/types/type_promotion_1/type_promotion_1.2.update.aql
new file mode 100644
index 0000000..05ffa1d
--- /dev/null
+++ b/asterix-app/src/test/resources/runtimets/queries/types/type_promotion_1/type_promotion_1.2.update.aql
@@ -0,0 +1,23 @@
+use dataverse TestDataverse;
+
+insert into dataset TestSet (
+  let $i08 := int8("100")
+  let $i16 := int16("10000")
+  let $i32 := 1000000
+  let $i64 := int64("10000000000")
+  return {
+    "id": 1,
+    "int8_u":  {{  $i08 }},
+    "int8_o":  [   $i08  ],
+    "int16_u": {{  $i08, $i16 }},
+    "int16_o": [   $i08, $i16  ],
+    "int32_u": {{  $i08, $i16, $i32 }},
+    "int32_o": [   $i08, $i16, $i32  ],
+    "int64_u": {{  $i08, $i16, $i32, $i64 }},
+    "int64_o": [   $i08, $i16, $i32, $i64  ],
+    "float_u": {{  $i08, $i16, $i32 }},
+    "float_o": [   $i08, $i16, $i32  ],
+    "double_u": {{ $i08, $i16, $i32, $i64 }},
+    "double_o": [  $i08, $i16, $i32, $i64  ]
+  }
+)
diff --git a/asterix-app/src/test/resources/runtimets/queries/types/type_promotion_1/type_promotion_1.3.query.aql b/asterix-app/src/test/resources/runtimets/queries/types/type_promotion_1/type_promotion_1.3.query.aql
new file mode 100644
index 0000000..137b994
--- /dev/null
+++ b/asterix-app/src/test/resources/runtimets/queries/types/type_promotion_1/type_promotion_1.3.query.aql
@@ -0,0 +1,4 @@
+use dataverse TestDataverse;
+
+for $i in dataset TestSet
+return $i
diff --git a/asterix-app/src/test/resources/runtimets/results/types/type_promotion_1/type_promotion_1.1.adm b/asterix-app/src/test/resources/runtimets/results/types/type_promotion_1/type_promotion_1.1.adm
new file mode 100644
index 0000000..2fc6069
--- /dev/null
+++ b/asterix-app/src/test/resources/runtimets/results/types/type_promotion_1/type_promotion_1.1.adm
@@ -0,0 +1 @@
+{ "id": 1i64, "int8_u": {{ 100i8 }}, "int8_o": [ 100i8 ], "int16_u": {{ 100i16, 10000i16 }}, "int16_o": [ 100i16, 10000i16 ], "int32_u": {{ 100, 10000, 1000000 }}, "int32_o": [ 100, 10000, 1000000 ], "int64_u": {{ 100i64, 10000i64, 1000000i64, 10000000000i64 }}, "int64_o": [ 100i64, 10000i64, 1000000i64, 10000000000i64 ], "float_u": {{ 100.0f, 10000.0f, 1000000.0f }}, "float_o": [ 100.0f, 10000.0f, 1000000.0f ], "double_u": {{ 100.0d, 10000.0d, 1000000.0d, 1.0E10d }}, "double_o": [ 100.0d, 10000.0d, 1000000.0d, 1.0E10d ] }
diff --git a/asterix-app/src/test/resources/runtimets/testsuite.xml b/asterix-app/src/test/resources/runtimets/testsuite.xml
index 9cdc3df..faab5aa 100644
--- a/asterix-app/src/test/resources/runtimets/testsuite.xml
+++ b/asterix-app/src/test/resources/runtimets/testsuite.xml
@@ -4994,5 +4994,10 @@
         <output-dir compare="Text">type_promotion_0</output-dir>
       </compilation-unit>
     </test-case>
+    <test-case FilePath="types">
+      <compilation-unit name="type_promotion_1">
+        <output-dir compare="Text">type_promotion_1</output-dir>
+      </compilation-unit>
+    </test-case>
   </test-group>
 </test-suite>