Skip to content

Commit

Permalink
whitespace for test google#2
Browse files Browse the repository at this point in the history
  • Loading branch information
unintellisense committed Jan 8, 2019
1 parent 76e4960 commit fb352e5
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions tests/JavaScriptTest.js
Original file line number Diff line number Diff line change
Expand Up @@ -83,11 +83,11 @@ function serializeAndTest(fbb) {
// JavaScript code. They are functionally equivalent though.

fs.writeFileSync('monsterdata_javascript_wire.mon', new Buffer(fbb.asUint8Array()));

// Tests mutation first. This will verify that we did not trample any other
// part of the byte buffer.
testMutation(fbb.dataBuffer());

testBuffer(fbb.dataBuffer());
}

Expand Down Expand Up @@ -213,13 +213,13 @@ function testUnicode() {
assert.strictEqual(monster.name(), json.name);
assert.deepEqual(new Buffer(monster.name(flatbuffers.Encoding.UTF8_BYTES)), new Buffer(json.name));
assert.strictEqual(monster.testarrayoftablesLength(), json.testarrayoftables.length);
json.testarrayoftables.forEach(function (table, i) {
json.testarrayoftables.forEach(function (table, i) {
var value = monster.testarrayoftables(i);
assert.strictEqual(value.name(), table.name);
assert.deepEqual(new Buffer(value.name(flatbuffers.Encoding.UTF8_BYTES)), new Buffer(table.name));
});
assert.strictEqual(monster.testarrayofstringLength(), json.testarrayofstring.length);
json.testarrayofstring.forEach(function (string, i) {
json.testarrayofstring.forEach(function(string, i) {
assert.strictEqual(monster.testarrayofstring(i), string);
assert.deepEqual(new Buffer(monster.testarrayofstring(i, flatbuffers.Encoding.UTF8_BYTES)), new Buffer(string));
});
Expand All @@ -229,7 +229,7 @@ function testUnicode() {
// Test writing
var fbb = new flatbuffers.Builder();
var name = fbb.createString(json.name);
var testarrayoftablesOffsets = json.testarrayoftables.map(function (table) {
var testarrayoftablesOffsets = json.testarrayoftables.map(function(table) {
var name = fbb.createString(new Uint8Array(new Buffer(table.name)));
MyGame.Example.Monster.startMonster(fbb);
MyGame.Example.Monster.addName(fbb, name);
Expand All @@ -238,7 +238,7 @@ function testUnicode() {
var testarrayoftablesOffset = MyGame.Example.Monster.createTestarrayoftablesVector(fbb,
testarrayoftablesOffsets);
var testarrayofstringOffset = MyGame.Example.Monster.createTestarrayofstringVector(fbb,
json.testarrayofstring.map(function (string) { return fbb.createString(string); }));
json.testarrayofstring.map(function(string) { return fbb.createString(string); }));
MyGame.Example.Monster.startMonster(fbb);
MyGame.Example.Monster.addTestarrayofstring(fbb, testarrayofstringOffset);
MyGame.Example.Monster.addTestarrayoftables(fbb, testarrayoftablesOffset);
Expand All @@ -247,7 +247,7 @@ function testUnicode() {
testReadingUnicode(new flatbuffers.ByteBuffer(fbb.asUint8Array()));
}

var __imul = Math.imul ? Math.imul : function (a, b) {
var __imul = Math.imul ? Math.imul : function(a, b) {
var ah = a >> 16 & 65535;
var bh = b >> 16 & 65535;
var al = a & 65535;
Expand Down

0 comments on commit fb352e5

Please sign in to comment.