From ee2855d6b441a3ca84de96aef540f4d6b42d2812 Mon Sep 17 00:00:00 2001 From: Suyash Bagad Date: Thu, 23 Mar 2023 17:49:04 +0000 Subject: [PATCH] minor change. --- .../barretenberg/stdlib/primitives/field/field.test.cpp | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/cpp/src/barretenberg/stdlib/primitives/field/field.test.cpp b/cpp/src/barretenberg/stdlib/primitives/field/field.test.cpp index a1bdda1e47..ebd46d5936 100644 --- a/cpp/src/barretenberg/stdlib/primitives/field/field.test.cpp +++ b/cpp/src/barretenberg/stdlib/primitives/field/field.test.cpp @@ -955,15 +955,14 @@ template class stdlib_field : public testing::Test { barretenberg::fr value(engine.get_random_uint256()); field_ct value_ct = witness_ct(&composer, value); - field_ct first_copy(&composer, value_ct.get_value()); + field_ct first_copy = witness_ct(&composer, value_ct.get_value()); field_ct second_copy = field_ct::copy_as_new_witness(composer, value_ct); EXPECT_EQ(value_ct.get_value(), value); EXPECT_EQ(first_copy.get_value(), value); EXPECT_EQ(second_copy.get_value(), value); - EXPECT_NE(value_ct.get_witness_index(), first_copy.get_witness_index()); - EXPECT_EQ(first_copy.get_witness_index(), uint32_t(-1)); - EXPECT_EQ(value_ct.get_witness_index() + 1, second_copy.get_witness_index()); + EXPECT_EQ(value_ct.get_witness_index() + 1, first_copy.get_witness_index()); + EXPECT_EQ(value_ct.get_witness_index() + 2, second_copy.get_witness_index()); auto prover = composer.create_prover(); auto verifier = composer.create_verifier();