Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Resolve #1603 and make sure we do not break this in the future
- Loading branch information
1 parent
3126297
commit 7148ed5
Showing
7 changed files
with
79 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
module.exports = { | ||
description: 'assignment to views of buffers should be kept', | ||
options: { name: 'bundle' } | ||
}; |
14 changes: 14 additions & 0 deletions
14
test/form/samples/assignment-to-array-buffer-view/_expected/amd.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
define(['exports'], function (exports) { 'use strict'; | ||
|
||
var buffer = new ArrayBuffer( 8 ); | ||
|
||
var view8 = new Int8Array( buffer ); | ||
var view16 = new Int16Array( buffer ); | ||
|
||
view16[ 0 ] = 3; | ||
|
||
exports.view8 = view8; | ||
|
||
Object.defineProperty(exports, '__esModule', { value: true }); | ||
|
||
}); |
12 changes: 12 additions & 0 deletions
12
test/form/samples/assignment-to-array-buffer-view/_expected/cjs.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
'use strict'; | ||
|
||
Object.defineProperty(exports, '__esModule', { value: true }); | ||
|
||
var buffer = new ArrayBuffer( 8 ); | ||
|
||
var view8 = new Int8Array( buffer ); | ||
var view16 = new Int16Array( buffer ); | ||
|
||
view16[ 0 ] = 3; | ||
|
||
exports.view8 = view8; |
8 changes: 8 additions & 0 deletions
8
test/form/samples/assignment-to-array-buffer-view/_expected/es.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
var buffer = new ArrayBuffer( 8 ); | ||
|
||
var view8 = new Int8Array( buffer ); | ||
var view16 = new Int16Array( buffer ); | ||
|
||
view16[ 0 ] = 3; | ||
|
||
export { view8 }; |
15 changes: 15 additions & 0 deletions
15
test/form/samples/assignment-to-array-buffer-view/_expected/iife.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
var bundle = (function (exports) { | ||
'use strict'; | ||
|
||
var buffer = new ArrayBuffer( 8 ); | ||
|
||
var view8 = new Int8Array( buffer ); | ||
var view16 = new Int16Array( buffer ); | ||
|
||
view16[ 0 ] = 3; | ||
|
||
exports.view8 = view8; | ||
|
||
return exports; | ||
|
||
}({})); |
18 changes: 18 additions & 0 deletions
18
test/form/samples/assignment-to-array-buffer-view/_expected/umd.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
(function (global, factory) { | ||
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) : | ||
typeof define === 'function' && define.amd ? define(['exports'], factory) : | ||
(factory((global.bundle = {}))); | ||
}(this, (function (exports) { 'use strict'; | ||
|
||
var buffer = new ArrayBuffer( 8 ); | ||
|
||
var view8 = new Int8Array( buffer ); | ||
var view16 = new Int16Array( buffer ); | ||
|
||
view16[ 0 ] = 3; | ||
|
||
exports.view8 = view8; | ||
|
||
Object.defineProperty(exports, '__esModule', { value: true }); | ||
|
||
}))); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
var buffer = new ArrayBuffer( 8 ); | ||
|
||
var view8 = new Int8Array( buffer ); | ||
var view16 = new Int16Array( buffer ); | ||
|
||
view16[ 0 ] = 3; | ||
|
||
export { view8 }; |