From aca63f71c19fffc2fa1abef0c8604c608a2236d0 Mon Sep 17 00:00:00 2001 From: AztecBot Date: Sun, 26 Jul 2026 06:16:40 +0000 Subject: [PATCH] update PR #24979 --- .../acir_components_check/components_check.test.cpp | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/barretenberg/cpp/src/barretenberg/acir_components_check/components_check.test.cpp b/barretenberg/cpp/src/barretenberg/acir_components_check/components_check.test.cpp index 40e7d8fa16e2..13bfcfa8ea31 100644 --- a/barretenberg/cpp/src/barretenberg/acir_components_check/components_check.test.cpp +++ b/barretenberg/cpp/src/barretenberg/acir_components_check/components_check.test.cpp @@ -145,7 +145,7 @@ void expect_single_error_type(const std::vector& e acir_components_check::Error::Type type) { ASSERT_EQ(errors.size(), 1U); - EXPECT_EQ(errors[0].type, type); + EXPECT_EQ(errors[0].type, type) << errors[0].message; } size_t count_acir_components_for_witnesses(const Acir::Circuit& circuit, const std::vector& witnesses) @@ -549,18 +549,19 @@ TEST_F(AcirComponentsCheckTest, DetectsUnconstrainedWitnesses) .value = Acir::Expression{ .linear_combinations = { - { bb::fr::one().to_buffer(), make_witness(8) }, - { bb::fr(-1).to_buffer(), make_witness(9) }, + { bb::fr::one().to_buffer(), make_witness(1000) }, + { bb::fr(-1).to_buffer(), make_witness(1001) }, }, .q_c = bb::fr::zero().to_buffer(), } } }, }); - auto constraints = circuit_serde_to_acir_format(circuit, IsMegaBuilder); + auto circuit_missing_witness = make_circuit({ + Acir::Opcode{ .value = Acir::Opcode::AssertZero{ .value = make_witness_expression(0) } }, + }); + auto constraints = circuit_serde_to_acir_format(circuit_missing_witness, IsMegaBuilder); AcirProgram program{ .constraints = constraints, .witness = {} }; auto builder = create_circuit(program); - // Corrupt the circuit - builder.real_variable_index.resize(9); acir_components_check::ComponentsChecker checker(circuit, builder); auto errors = checker.check();