Title: [210312] trunk/JSTests
Revision
210312
Author
[email protected]
Date
2017-01-04 18:49:51 -0800 (Wed, 04 Jan 2017)

Log Message

WebAssembly: sections with the same name are allowed
https://bugs.webkit.org/show_bug.cgi?id=166708

Reviewed by Saam Barati.

* wasm/self-test/test_BuilderJSON.js:
(SectionsWithSameCustomName):

Modified Paths

Diff

Modified: trunk/JSTests/ChangeLog (210311 => 210312)


--- trunk/JSTests/ChangeLog	2017-01-05 02:00:28 UTC (rev 210311)
+++ trunk/JSTests/ChangeLog	2017-01-05 02:49:51 UTC (rev 210312)
@@ -1,3 +1,13 @@
+2017-01-04  JF Bastien  <[email protected]>
+
+        WebAssembly: sections with the same name are allowed
+        https://bugs.webkit.org/show_bug.cgi?id=166708
+
+        Reviewed by Saam Barati.
+
+        * wasm/self-test/test_BuilderJSON.js:
+        (SectionsWithSameCustomName):
+
 2017-01-04  Saam Barati  <[email protected]>
 
         stress/spread-calling.js timing out on the bots

Modified: trunk/JSTests/wasm/self-test/test_BuilderJSON.js (210311 => 210312)


--- trunk/JSTests/wasm/self-test/test_BuilderJSON.js	2017-01-05 02:00:28 UTC (rev 210311)
+++ trunk/JSTests/wasm/self-test/test_BuilderJSON.js	2017-01-05 02:49:51 UTC (rev 210312)
@@ -80,8 +80,15 @@
 })();
 
 (function SectionsWithSameCustomName() {
-    const b = (new Builder()).Unknown("foo").End();
-    assert.throws(() => b.Unknown("foo"), Error, `Expected falsy: Cannot have two sections with the same name "foo" and ID 0`);
+    const b = (new Builder()).Unknown("foo").Byte(42).End().Unknown("foo").Byte(100).End();
+    const j = JSON.parse(b.json());
+    assert.eq(j.section.length, 2);
+    assert.eq(j.section[0].name, "foo");
+    assert.eq(j.section[0].data.length, 1);
+    assert.eq(j.section[0].data[0], 42);
+    assert.eq(j.section[1].name, "foo");
+    assert.eq(j.section[1].data.length, 1);
+    assert.eq(j.section[1].data[0], 100);
 })();
 
 (function EmptyTypeSection() {
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to