Skip to content

Commit 77fac16

Browse files
author
Harsh
committed
test: fix for new changes
1 parent fbf1435 commit 77fac16

1 file changed

Lines changed: 12 additions & 2 deletions

File tree

test/index.js

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,26 @@
1-
const test = require('tape'),
1+
const { GPU } = require('gpu.js'),
2+
test = require('tape'),
23
index = require('../src/index').benchmark;
34

5+
const gpu = new GPU(),
6+
cpu = new GPU({ mode: 'cpu' });
7+
48
test('index.js entry point test', t => {
59
const expectedDefaults = require('../src/util/defaults.json'),
610
expectedNonDefaultOptions = {
11+
gpu,
12+
cpu,
713
matrix_size: 1024,
814
num_iterations: 5,
915
logs: false,
1016
cpu_benchmark: false
1117
};
1218

13-
const options = index().getDataField('options');
19+
const options = index({
20+
gpu,
21+
cpu,
22+
gpu: new GPU(),
23+
}).getDataField('options');
1424
const nonDefaultOptions = index(expectedNonDefaultOptions).getDataField('options');
1525

1626
for (let def in expectedDefaults) {

0 commit comments

Comments
 (0)