Skip to content

Commit 0e7483e

Browse files
tniessenGabriel Schulhof
authored andcommitted
Fix code format in tests
PR-URL: #617 Reviewed-By: Gabriel Schulhof <gabriel.schulhof@intel.com> Reviewed-By: Chengzhong Wu <legendecas@gmail.com> Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
1 parent 6a06463 commit 0e7483e

File tree

4 files changed

+8
-8
lines changed

4 files changed

+8
-8
lines changed

test/basic_types/array.cc

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,9 @@ using namespace Napi;
55
Value CreateArray(const CallbackInfo& info) {
66
if (info.Length() > 0) {
77
size_t length = info[0].As<Number>().Uint32Value();
8-
return Array::New(info.Env(), length);
8+
return Array::New(info.Env(), length);
99
} else {
10-
return Array::New(info.Env());
10+
return Array::New(info.Env());
1111
}
1212
}
1313

@@ -19,13 +19,13 @@ Value GetLength(const CallbackInfo& info) {
1919
Value GetElement(const CallbackInfo& info) {
2020
Array array = info[0].As<Array>();
2121
size_t index = info[1].As<Number>().Uint32Value();
22-
return array[index];
22+
return array[index];
2323
}
2424

2525
void SetElement(const CallbackInfo& info) {
2626
Array array = info[0].As<Array>();
2727
size_t index = info[1].As<Number>().Uint32Value();
28-
array[index] = info[2].As<Value>();
28+
array[index] = info[2].As<Value>();
2929
}
3030

3131
Object InitBasicTypesArray(Env env) {

test/basic_types/array.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ function test(binding) {
1212
assert.strictEqual(binding.basic_types_array.getLength(array), 0);
1313

1414
// create array with length
15-
const arrayWithLength = binding.basic_types_array.createArray(10);
15+
const arrayWithLength = binding.basic_types_array.createArray(10);
1616
assert.strictEqual(binding.basic_types_array.getLength(arrayWithLength), 10);
1717

1818
// set function test

test/testUtil.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
// with an async delay and GC call between each.
33
function runGCTests(tests, i, title) {
44
if (!i) {
5-
i = 0;
5+
i = 0;
66
}
77

88
if (tests[i]) {
@@ -25,5 +25,5 @@ function runGCTests(tests, i, title) {
2525
}
2626

2727
module.exports = {
28-
runGCTests,
28+
runGCTests,
2929
};

test/threadsafe_function/threadsafe_function_sum.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ void FinalizerCallback(Napi::Env env, TestData* finalizeData){
2828
for (size_t i = 0; i < finalizeData->threads.size(); ++i) {
2929
finalizeData->threads[i].join();
3030
}
31-
finalizeData->deferred.Resolve(Boolean::New(env,true));
31+
finalizeData->deferred.Resolve(Boolean::New(env, true));
3232
delete finalizeData;
3333
}
3434

0 commit comments

Comments
 (0)