From 9244107ebf9419456f4ec8bd8293b4f1f6fa3733 Mon Sep 17 00:00:00 2001
From: Hank Yates <hankyates@gmail.com>
Date: Sun, 26 Jan 2014 15:53:44 -0800
Subject: [PATCH] Adding Array#of tests

---
 .../es6/ch22/22.1/22.1.2/S22.1.2.3_T1.js      | 22 +++++++++++++++++++
 .../es6/ch22/22.1/22.1.2/S22.1.2.3_T2.js      | 21 ++++++++++++++++++
 2 files changed, 43 insertions(+)
 create mode 100644 test/suite/es6/ch22/22.1/22.1.2/S22.1.2.3_T1.js
 create mode 100644 test/suite/es6/ch22/22.1/22.1.2/S22.1.2.3_T2.js

diff --git a/test/suite/es6/ch22/22.1/22.1.2/S22.1.2.3_T1.js b/test/suite/es6/ch22/22.1/22.1.2/S22.1.2.3_T1.js
new file mode 100644
index 0000000000..62a7b60bc8
--- /dev/null
+++ b/test/suite/es6/ch22/22.1/22.1.2/S22.1.2.3_T1.js
@@ -0,0 +1,22 @@
+// Copyright (c) 2014 Hank Yates. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+//
+/**
+ * @description Testing Array#of when passed Strings
+ * @author Hank Yates (hankyates@gmail.com)
+ */
+
+runTestCase(function () {
+  var testArr = Array.of('testString', 'anotherTestString');
+
+  if (testArr[0] !== 'testString') {
+    return false;
+  }
+
+  if (testArr[1] !== 'anotherTestString') {
+    return false;
+  }
+
+  return true;
+
+});
diff --git a/test/suite/es6/ch22/22.1/22.1.2/S22.1.2.3_T2.js b/test/suite/es6/ch22/22.1/22.1.2/S22.1.2.3_T2.js
new file mode 100644
index 0000000000..4a93a5b371
--- /dev/null
+++ b/test/suite/es6/ch22/22.1/22.1.2/S22.1.2.3_T2.js
@@ -0,0 +1,21 @@
+// Copyright (c) 2014 Hank Yates. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+/**
+ * @description Testing Array#of when passed single argument
+ * @author Hank Yates (hankyates@gmail.com)
+ */
+
+runTestCase(function () {
+  var testArr = Array.of(3);
+
+  if (testArr.length !== 1) {
+    return false;
+  }
+
+  if (testArr[0] !== 3) {
+    return false;
+  }
+
+  return true;
+
+});
-- 
GitLab