Skip to content

Commit

Permalink
9745: fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
jeanmon committed Nov 11, 2024
1 parent b938f15 commit a482f03
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 3 deletions.
3 changes: 3 additions & 0 deletions barretenberg/cpp/src/barretenberg/vm/avm/trace/helper.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,9 @@ std::string to_name(AvmError error)
return "ENVIRONMENT VARIABLE UNKNOWN";
case AvmError::CONTRACT_INST_MEM_UNKNOWN:
return "CONTRACT INSTANCE MEMBER UNKNOWN";
default:
throw std::runtime_error("Invalid error type");
break;
}
}

Expand Down
1 change: 1 addition & 0 deletions barretenberg/cpp/src/barretenberg/vm/avm/trace/trace.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3115,6 +3115,7 @@ ReturnDataError AvmTraceBuilder::op_revert(uint8_t indirect, uint32_t ret_offset

pc = UINT32_MAX; // This ensures that no subsequent opcode will be executed.
return ReturnDataError{
.return_data = {},
.error = op_valid ? AvmError::NO_ERROR : AvmError::TAG_ERROR,
};
}
Expand Down
6 changes: 3 additions & 3 deletions yarn-project/simulator/src/avm/opcodes/ec_add.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { Grumpkin } from '@aztec/circuits.js/barretenberg';
import { beforeEach } from '@jest/globals';

import { type AvmContext } from '../avm_context.js';
import { Field, Uint32 } from '../avm_memory_types.js';
import { Field, Uint1, Uint32 } from '../avm_memory_types.js';
import { initContext } from '../fixtures/index.js';
import { EcAdd } from './ec_add.js';

Expand Down Expand Up @@ -47,7 +47,7 @@ describe('EC Instructions', () => {
it(`Should double correctly`, async () => {
const x = new Field(grumpkin.generator().x);
const y = new Field(grumpkin.generator().y);
const zero = new Uint32(0);
const zero = new Uint1(0);

context.machineState.memory.set(0, x);
context.machineState.memory.set(1, y);
Expand Down Expand Up @@ -81,7 +81,7 @@ describe('EC Instructions', () => {

it('Should add correctly', async () => {
const G2 = grumpkin.add(grumpkin.generator(), grumpkin.generator());
const zero = new Uint32(0);
const zero = new Uint1(0);

const x1 = new Field(grumpkin.generator().x);
const y1 = new Field(grumpkin.generator().y);
Expand Down

0 comments on commit a482f03

Please sign in to comment.