Skip to content

Commit

Permalink
fix: use pedersen handler in related tests
Browse files Browse the repository at this point in the history
  • Loading branch information
zmalatrax committed May 31, 2024
1 parent edf1052 commit 11ad904
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions src/builtins/pedersen.test.ts
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
import { describe, expect, test } from 'bun:test';

import { UndefinedValue } from 'errors/builtins';
import { ExpectedFelt } from 'errors/virtualMachine';

import { Felt } from 'primitives/felt';
import { Relocatable } from 'primitives/relocatable';
import { Memory } from 'memory/memory';
import { bitwiseHandler } from './bitwise';
import { ExpectedFelt } from 'errors/virtualMachine';
import { pedersenHandler } from './pedersen';

type PedersenInput = {
Expand Down Expand Up @@ -65,7 +64,7 @@ describe('Pedersen', () => {
'should throw UndefinedValue error when one of the two input is not constrained',
(offset: number) => {
const memory = new Memory();
const { segmentId } = memory.addSegment(bitwiseHandler);
const { segmentId } = memory.addSegment(pedersenHandler);
const address = new Relocatable(segmentId, offset);
const addressHash = new Relocatable(segmentId, 2);

Expand All @@ -79,7 +78,7 @@ describe('Pedersen', () => {

test('should throw ExpectedFelt error when trying to constrain an input cell to a Relocatable', () => {
const memory = new Memory();
const { segmentId } = memory.addSegment(bitwiseHandler);
const { segmentId } = memory.addSegment(pedersenHandler);
const addressHash = new Relocatable(segmentId, 2);

const xAddr = new Relocatable(segmentId, 0);
Expand Down

0 comments on commit 11ad904

Please sign in to comment.