mirror of
https://github.com/overte-org/overte.git
synced 2025-08-08 08:37:19 +02:00
Added ArrayBuffer unit tests
This commit is contained in:
parent
96a1390d8f
commit
05d74e2bb1
1 changed files with 22 additions and 0 deletions
22
examples/typedArraysUnitTest.js
Normal file
22
examples/typedArraysUnitTest.js
Normal file
|
@ -0,0 +1,22 @@
|
|||
//
|
||||
// typedArraysunitTest.js
|
||||
// examples
|
||||
//
|
||||
// Created by Clément Brisset on 7/7/14
|
||||
// Copyright 2014 High Fidelity, Inc.
|
||||
//
|
||||
// Distributed under the Apache License, Version 2.0.
|
||||
// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
|
||||
//
|
||||
|
||||
Script.include("Test.js");
|
||||
|
||||
test("ArrayBuffer", function(finished) {
|
||||
this.assertEquals(new ArrayBuffer().byteLength, 0, 'no length');
|
||||
|
||||
this.assertEquals(typeof(new ArrayBuffer(0)), 'object', 'creation');
|
||||
this.assertEquals(typeof(new ArrayBuffer(1)), 'object', 'creation');
|
||||
this.assertEquals(typeof(new ArrayBuffer(123)), 'object', 'creation');
|
||||
|
||||
this.assertEquals(new ArrayBuffer(123).byteLength, 123, 'length');
|
||||
});
|
Loading…
Reference in a new issue