Boundary value tests for int* constructors

git-svn-id: https://asterixdb.googlecode.com/svn/branches/asterix_stabilization@241 eaa15691-b419-025a-1212-ee371bd00084
diff --git a/asterix-app/src/test/resources/runtimets/queries/constructor/primitive-01.aql b/asterix-app/src/test/resources/runtimets/queries/constructor/primitive-01.aql
new file mode 100644
index 0000000..3319d90
--- /dev/null
+++ b/asterix-app/src/test/resources/runtimets/queries/constructor/primitive-01.aql
@@ -0,0 +1,21 @@
+/*
+ * Test case name : primitive-01.aql
+ * Description    : Test primitive integer type int8 constructor function with boundary values
+ * Success        : Yes
+ * Date           : May 7th 2012
+ *
+ */
+
+write output to nc1:"rttest/constructor_primitive-01.adm";
+
+//Boundary value tests int8().
+//with MIN and MAX supported values.
+
+let $a:=int8("-127")
+let $b:=int8("127")
+let $c:=int8("0")
+let $d:=int8("1")
+let $e:=int8("-1")
+return {"$a":$a,"$b":$b,"$c":$c,"$d":$d,"$e":$e}
+
+
diff --git a/asterix-app/src/test/resources/runtimets/queries/constructor/primitive-02.aql b/asterix-app/src/test/resources/runtimets/queries/constructor/primitive-02.aql
new file mode 100644
index 0000000..3aa1a13
--- /dev/null
+++ b/asterix-app/src/test/resources/runtimets/queries/constructor/primitive-02.aql
@@ -0,0 +1,23 @@
+/*
+ * Test case name : primitive-02.aql
+ * Description    : Test primitive integer type int16 constructor function with boundary values
+ * Success        : Yes
+ * Date           : May 7th 2012
+ *
+ */
+
+write output to nc1:"rttest/constructor_primitive-02.adm";
+
+//Boundary value tests int16().
+//with MIN and MAX supported values.
+
+let $a:=int16("-32767")
+let $b:=int16("32767")
+let $c:=int16("0")
+let $d:=int16("1")
+let $e:=int16("-1")
+let $f:=int16("16383")
+let $g:=int16("-16383")
+
+return {"$a":$a,"$b":$b,"$c":$c,"$d":$d,"$e":$e,"$f":$f,"$g":$g}
+
diff --git a/asterix-app/src/test/resources/runtimets/queries/constructor/primitive-03.aql b/asterix-app/src/test/resources/runtimets/queries/constructor/primitive-03.aql
new file mode 100644
index 0000000..f3df161
--- /dev/null
+++ b/asterix-app/src/test/resources/runtimets/queries/constructor/primitive-03.aql
@@ -0,0 +1,23 @@
+/*
+ * Test case name : primitive-03.aql
+ * Description    : Test primitive integer type int32 constructor function with boundary values
+ * Success        : Yes
+ * Date           : May 7th 2012
+ *
+ */
+
+write output to nc1:"rttest/constructor_primitive-03.adm";
+
+//Boundary value tests int32().
+//with MIN and MAX supported values.
+
+let $a:=int32("-2147483647")
+let $b:=int32("2147483647")
+
+let $c:=int32("0")
+let $d:=int32("1")
+let $e:=int32("-1")
+let $f:=int32("1073741828")
+let $g:=int32("-1073741828")
+
+return {"$a":$a,"$b":$b,"$c":$c,"$d":$d,"$e":$e,"$f":$f,"$g":$g}
diff --git a/asterix-app/src/test/resources/runtimets/queries/constructor/primitive-04.aql b/asterix-app/src/test/resources/runtimets/queries/constructor/primitive-04.aql
new file mode 100644
index 0000000..a8e0b02
--- /dev/null
+++ b/asterix-app/src/test/resources/runtimets/queries/constructor/primitive-04.aql
@@ -0,0 +1,23 @@
+/*
+ * Test case name : primitive-04.aql
+ * Description    : Test primitive integer type int64 constructor functions with boundary values
+ * Success        : Yes
+ * Date           : May 7th 2012
+ *
+ */
+
+write output to nc1:"rttest/constructor_primitive-04.adm";
+
+//Boundary value tests int64().
+//with MIN and MAX supported values.
+
+let $a:=int64("9222872036854775809")
+let $b:=int64("-9222872036854775809")
+
+let $c:=int64("0")
+let $d:=int64("1")
+let $e:=int64("-1")
+let $f:=int64("4611436018427387904")
+let $g:=int64("-4611436018427387904")
+
+return {"$a":$a,"$b":$b,"$c":$c,"$d":$d,"$e":$e,"$f":$f,"$g":$g}
diff --git a/asterix-app/src/test/resources/runtimets/results/constructor/constructor_primitive-01.adm b/asterix-app/src/test/resources/runtimets/results/constructor/constructor_primitive-01.adm
new file mode 100644
index 0000000..e4f0501
--- /dev/null
+++ b/asterix-app/src/test/resources/runtimets/results/constructor/constructor_primitive-01.adm
@@ -0,0 +1 @@
+{ "$a": -127i8, "$b": 127i8, "$c": 0i8, "$d": 1i8, "$e": -1i8 }
diff --git a/asterix-app/src/test/resources/runtimets/results/constructor/constructor_primitive-02.adm b/asterix-app/src/test/resources/runtimets/results/constructor/constructor_primitive-02.adm
new file mode 100644
index 0000000..32b89e7
--- /dev/null
+++ b/asterix-app/src/test/resources/runtimets/results/constructor/constructor_primitive-02.adm
@@ -0,0 +1 @@
+{ "$a": -32767i16, "$b": 32767i16, "$c": 0i16, "$d": 1i16, "$e": -1i16, "$f": 16383i16, "$g": -16383i16 }
diff --git a/asterix-app/src/test/resources/runtimets/results/constructor/constructor_primitive-03.adm b/asterix-app/src/test/resources/runtimets/results/constructor/constructor_primitive-03.adm
new file mode 100644
index 0000000..f7774d0
--- /dev/null
+++ b/asterix-app/src/test/resources/runtimets/results/constructor/constructor_primitive-03.adm
@@ -0,0 +1 @@
+{ "$a": -2147483647, "$b": 2147483647, "$c": 0, "$d": 1, "$e": -1, "$f": 1073741828, "$g": -1073741828 }
diff --git a/asterix-app/src/test/resources/runtimets/results/constructor/constructor_primitive-04.adm b/asterix-app/src/test/resources/runtimets/results/constructor/constructor_primitive-04.adm
new file mode 100644
index 0000000..3453e4e
--- /dev/null
+++ b/asterix-app/src/test/resources/runtimets/results/constructor/constructor_primitive-04.adm
@@ -0,0 +1 @@
+{ "$a": 9222872036854775809i64, "$b": -9222872036854775809i64, "$c": 0i64, "$d": 1i64, "$e": -1i64, "$f": 4611436018427387904i64, "$g": -4611436018427387904i64 }