diff --git a/dev/make-root/rntuple_emptystruct_invalidvar.C b/dev/make-root/rntuple_emptystruct_invalidvar.C index d0873e1..d4dca5b 100644 --- a/dev/make-root/rntuple_emptystruct_invalidvar.C +++ b/dev/make-root/rntuple_emptystruct_invalidvar.C @@ -34,9 +34,6 @@ void rntuple_emptystruct_invalidvar() { *variant_field = 1; // valid state ntuple->Fill(); - variant_field->emplace(2); // valid state - ntuple->Fill(); - try { *variant_field = StructForVariant(); // invalid state } catch (const std::runtime_error &e) { @@ -44,4 +41,7 @@ void rntuple_emptystruct_invalidvar() { } assert(variant_field->valueless_by_exception()); ntuple->Fill(); + + variant_field->emplace(2); // valid state + ntuple->Fill(); } diff --git a/src/skhep_testdata/data/test_emptystruct_invalidvar_rntuple_v1.root b/src/skhep_testdata/data/test_emptystruct_invalidvar_rntuple_v1.root index 4bc589d..ad7eab5 100644 Binary files a/src/skhep_testdata/data/test_emptystruct_invalidvar_rntuple_v1.root and b/src/skhep_testdata/data/test_emptystruct_invalidvar_rntuple_v1.root differ