@@ -145,7 +145,7 @@ void expect_single_error_type(const std::vector<acir_components_check::Error>& e
145145 acir_components_check::Error::Type type)
146146{
147147 ASSERT_EQ (errors.size (), 1U );
148- EXPECT_EQ (errors[0 ].type , type);
148+ EXPECT_EQ (errors[0 ].type , type) << errors[ 0 ]. message ;
149149}
150150
151151size_t count_acir_components_for_witnesses (const Acir::Circuit& circuit, const std::vector<uint32_t >& witnesses)
@@ -549,18 +549,19 @@ TEST_F(AcirComponentsCheckTest, DetectsUnconstrainedWitnesses)
549549 .value = Acir::Expression{
550550 .linear_combinations =
551551 {
552- { bb::fr::one ().to_buffer (), make_witness (8 ) },
553- { bb::fr (-1 ).to_buffer (), make_witness (9 ) },
552+ { bb::fr::one ().to_buffer (), make_witness (1000 ) },
553+ { bb::fr (-1 ).to_buffer (), make_witness (1001 ) },
554554 },
555555 .q_c = bb::fr::zero ().to_buffer (),
556556 } } },
557557 });
558558
559- auto constraints = circuit_serde_to_acir_format (circuit, IsMegaBuilder<AcirComponentsCheckBuilder>);
559+ auto circuit_missing_witness = make_circuit ({
560+ Acir::Opcode{ .value = Acir::Opcode::AssertZero{ .value = make_witness_expression (0 ) } },
561+ });
562+ auto constraints = circuit_serde_to_acir_format (circuit_missing_witness, IsMegaBuilder<AcirComponentsCheckBuilder>);
560563 AcirProgram program{ .constraints = constraints, .witness = {} };
561564 auto builder = create_circuit<AcirComponentsCheckBuilder>(program);
562- // Corrupt the circuit
563- builder.real_variable_index .resize (9 );
564565
565566 acir_components_check::ComponentsChecker checker (circuit, builder);
566567 auto errors = checker.check ();
0 commit comments