Skip to content

Commit

Permalink
54 % func coverage
Browse files Browse the repository at this point in the history
  • Loading branch information
Snafkin547 committed Apr 1, 2024
1 parent b32ae82 commit 583c84d
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion tests/regr-tests/arithmetics.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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]);
Expand Down
4 changes: 2 additions & 2 deletions tests/regr-tests/array-search.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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]);
Expand Down Expand Up @@ -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);
Expand Down
2 changes: 1 addition & 1 deletion tests/regr-tests/statistics.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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]);
Expand Down
8 changes: 4 additions & 4 deletions tests/regr-tests/vote.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -74,16 +74,16 @@ 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]);
}
}

// 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);
}
Expand All @@ -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);
});

0 comments on commit 583c84d

Please sign in to comment.