Skip to content

Commit

Permalink
refine pass-big-number
Browse files Browse the repository at this point in the history
  • Loading branch information
doehyunbaek committed Aug 26, 2024
1 parent 02bb17f commit f6a8fa8
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion tests/core/pass-big-number/website/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,14 @@
const indexBinary = await indexResponse.arrayBuffer();
let wasm = await WebAssembly.instantiate(indexBinary, imports);
instance = wasm.instance;
instance.exports.figma_5307(9223372036854775808n, 9223372036854775807n);
const biggest_i64 = 9223372036854775808n
const first_return = instance.exports.figma_5307(biggest_i64);
console.assert(first_return === biggest_i64, `Expected ${biggest_i64}, but got ${first_return}`);

const smallest_i64 = -9223372036854775808n
const second_return = instance.exports.figma_5307(smallest_i64);
console.assert(first_return === smallest_i64, `Expected ${smallest_i64}, but got ${first_return}`);

const endTime = performance.now();
const executionTime = endTime - startTime;
const executionTimeElement = document.createElement('p');
Expand Down
Binary file modified tests/core/pass-big-number/website/index.wasm
Binary file not shown.

0 comments on commit f6a8fa8

Please sign in to comment.