Home | History | Annotate | Download | only in tests

Lines Matching refs:new

12   var data = new Uint8Array(fs.readFileSync('monsterdata_test.mon'));
16 var bb = new flatbuffers.ByteBuffer(data);
23 var fbb = new flatbuffers.Builder(1);
88 fs.writeFileSync('monsterdata_javascript_wire.mon', new Buffer(fbb.asUint8Array()));
133 var monster2 = new MyGame.Example.Monster();
164 var fbb = new flatbuffers.Builder();
177 MyGame.Example.Stat.addVal(fbb, new flatbuffers.Long(0x87654321, 0x23456789)); // the low part is Uint32
191 var bb = new flatbuffers.ByteBuffer(bytes);
217 assert.deepEqual(new Buffer(monster.name(flatbuffers.Encoding.UTF8_BYTES)), new Buffer(json.name));
222 assert.deepEqual(new Buffer(value.name(flatbuffers.Encoding.UTF8_BYTES)), new Buffer(table.name));
227 assert.deepEqual(new Buffer(monster.testarrayofstring(i, flatbuffers.Encoding.UTF8_BYTES)), new Buffer(string));
230 testReadingUnicode(new flatbuffers.ByteBuffer(new Uint8Array(correct)));
233 var fbb = new flatbuffers.Builder();
236 var name = fbb.createString(new Uint8Array(new Buffer(table.name)));
250 testReadingUnicode(new flatbuffers.ByteBuffer(fbb.asUint8Array()));
294 var long_val = new flatbuffers.Long(0x44444444, 0x84444444);
295 var ulong_val = new flatbuffers.Long(0xCCCCCCCC, 0xFCCCCCCC);
296 var float_val = new Float32Array([3.14159])[0];
303 var builder = new flatbuffers.Builder();
336 var bytes = new Uint8Array(builder.asUint8Array());
337 var view = new DataView(bytes.buffer);