From 583c84d11f305f7d815d3d2b428aedac57a432ea Mon Sep 17 00:00:00 2001 From: Harunobu Ishii Date: Mon, 1 Apr 2024 17:31:12 -0400 Subject: [PATCH] 54 % func coverage --- tests/regr-tests/arithmetics.test.ts | 2 +- tests/regr-tests/array-search.test.ts | 4 ++-- tests/regr-tests/statistics.test.ts | 2 +- tests/regr-tests/vote.test.ts | 8 ++++---- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/tests/regr-tests/arithmetics.test.ts b/tests/regr-tests/arithmetics.test.ts index 6d3031a4e..5e790196d 100644 --- a/tests/regr-tests/arithmetics.test.ts +++ b/tests/regr-tests/arithmetics.test.ts @@ -8,7 +8,7 @@ describe('JIFF Arithmetic Operations', () => { beforeEach(async () => { // Server Setup - let port: number = 8112; + var port: number = 8111; const init_server = require('./server'); const servers = init_server(port); (jiffServer = servers[0]), (server = servers[1]); diff --git a/tests/regr-tests/array-search.test.ts b/tests/regr-tests/array-search.test.ts index 368a9f127..cb1783b20 100644 --- a/tests/regr-tests/array-search.test.ts +++ b/tests/regr-tests/array-search.test.ts @@ -10,7 +10,7 @@ describe('JIFF Arithmetic Operations', () => { beforeEach(async () => { // Server Setup - let port: number = 8112; + var port: number = 8113; const init_server = require('./server'); const servers = init_server(port); (jiffServer = servers[0]), (server = servers[1]); @@ -78,7 +78,7 @@ describe('JIFF Arithmetic Operations', () => { const mid = Math.floor(array.length / 2); const cmp = await element.slt(array[mid]); var nArray = []; - for (let i = 0; i < mid; i++) { + for (var i = 0; i < mid; i++) { var c1 = array[i]; var c2 = array[mid + i]; nArray[i] = await cmp.if_else(c1, c2); diff --git a/tests/regr-tests/statistics.test.ts b/tests/regr-tests/statistics.test.ts index 4a5acb59d..13aae3fe2 100644 --- a/tests/regr-tests/statistics.test.ts +++ b/tests/regr-tests/statistics.test.ts @@ -8,7 +8,7 @@ describe('JIFF Statistics Operations', () => { beforeEach(async () => { // Server Setup - let port: number = 8112; + var port: number = 8114; const init_server = require('./server'); const servers = init_server(port); (jiffServer = servers[0]), (server = servers[1]); diff --git a/tests/regr-tests/vote.test.ts b/tests/regr-tests/vote.test.ts index 9e467910e..376512e51 100644 --- a/tests/regr-tests/vote.test.ts +++ b/tests/regr-tests/vote.test.ts @@ -74,8 +74,8 @@ describe('JIFF Voting Operations', () => { // Aggregating all votes into the array named 'vote' var vote = input[1]; - for (let party = 2; party <= jiffClient.party_count; party++) { - for (let idx = 0; idx < vote.lenth; idx++) { + for (var party = 2; party <= jiffClient.party_count; party++) { + for (var idx = 0; idx < vote.length; idx++) { vote[idx] = await vote[idx].sadd(input[party][idx]); } } @@ -83,7 +83,7 @@ describe('JIFF Voting Operations', () => { // Check who's got the majority vote var majo_idx = 0; var curr_max = vote[0]; - for (let i = 1; i < vote.length; i++) { + for (var i = 1; i < vote.length; i++) { var iIsMax = await vote[i].sgt(curr_max); majo_idx = await iIsMax.if_else(i, majo_idx); } @@ -100,5 +100,5 @@ describe('JIFF Voting Operations', () => { const results = await Promise.all(jiffClients.map((client, idx) => find_majority_vote(client, idx + 1))); results.map((res) => expect(res).toEqual('3')); - }, 15000); + }, 25000); });