Skip to content

Commit

Permalink
Update test
Browse files Browse the repository at this point in the history
  • Loading branch information
petamoriken committed Sep 10, 2021
1 parent 90e4c57 commit 921f58b
Showing 1 changed file with 15 additions and 1 deletion.
16 changes: 15 additions & 1 deletion test/Float16Array.js
Original file line number Diff line number Diff line change
Expand Up @@ -415,7 +415,21 @@ describe("Float16Array", () => {
assert.equalFloat16ArrayValues( float16, checkArray );
});

it("check call from subclass", () => {
it("input Float16Array from another realm", function () {
if (AnotherRealmFloat16Array === undefined) {
this.skip();
}

const array = [1, 1.1, 1.2, 1.3];
const checkArray = [1, 1.099609375, 1.19921875, 1.2998046875];

const float16 = Float16Array.from( new AnotherRealmFloat16Array(array) );

assert( float16 instanceof Float16Array );
assert.equalFloat16ArrayValues( float16, checkArray );
});

it("call from subclass", () => {
class Foo extends Float16Array {}

const checkArray = [1, 1.099609375, 1.19921875, 1.2998046875];
Expand Down

0 comments on commit 921f58b

Please sign in to comment.