瀏覽代碼

[1.9>master] [1.8>1.9] [MERGE #4646 @obastemur] typedarray: new builtin_from test

Merge pull request #4646 from obastemur:new_arr_test

Moving a test case from release brach. Original test credit goes to @curtisman
Oguz Bastemur 8 年之前
父節點
當前提交
c0c17cf91f
共有 2 個文件被更改,包括 16 次插入0 次删除
  1. 10 0
      test/typedarray/builtin_from.js
  2. 6 0
      test/typedarray/rlexe.xml

+ 10 - 0
test/typedarray/builtin_from.js

@@ -0,0 +1,10 @@
+//-------------------------------------------------------------------------------------------------------
+// Copyright (C) Microsoft. All rights reserved.
+// Licensed under the MIT license. See LICENSE.txt file in the project root for full license information.
+//-------------------------------------------------------------------------------------------------------
+
+var a = "yy?x¼$w    5?åoê?»'i?ºE-N¼ë6_»\\ d";
+if (Uint8Array.from(a, c=>c.charCodeAt(0)) + "" == "121,121,63,120,253,36,119,32,32,32,32,53,63,253,111,253,63,253,39,105,63,253,69,45,78,253,253,54,95,253,92,32,100")
+{
+    print("pass");
+}

+ 6 - 0
test/typedarray/rlexe.xml

@@ -382,4 +382,10 @@ Below test fails with difference in space. Investigate the cause and re-enable t
       <files>CrossSiteVirtual.js</files>
     </default>
   </test>
+  <test>
+    <default>
+      <files>builtin_from.js</files>
+      <tags>typedarray</tags>
+    </default>
+  </test>
 </regress-exe>