Skip to content

Commit 8c8b706

Browse files
committed
Fix an update to a finished value
1 parent fb26285 commit 8c8b706

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

src/libexpr-tests/value/print.cc

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ using namespace testing;
1010
struct ValuePrintingTests : LibExprTest
1111
{
1212
template<class... A>
13-
void test(Value v, std::string_view expected, A... args)
13+
void test(Value & v, std::string_view expected, A... args)
1414
{
1515
std::stringstream out;
1616
v.print(state, out, args...);
@@ -625,10 +625,11 @@ TEST_F(ValuePrintingTests, ansiColorsAttrsElided)
625625
vThree.mkInt(3);
626626

627627
builder.insert(state.symbols.create("three"), &vThree);
628-
vAttrs.mkAttrs(builder.finish());
628+
Value vAttrs2;
629+
vAttrs2.mkAttrs(builder.finish());
629630

630631
test(
631-
vAttrs,
632+
vAttrs2,
632633
"{ one = " ANSI_CYAN "1" ANSI_NORMAL "; " ANSI_FAINT "«2 attributes elided»" ANSI_NORMAL " }",
633634
PrintOptions{.ansiColors = true, .maxAttrs = 1});
634635
}

0 commit comments

Comments
 (0)