Index: tests/parameters.test =================================================================== diff -u -rcef0608bea97458e5dcd87615c9b8ca3fe7b464c -rb60bb4c1295b7317ecc7f42258537afa9f483a70 --- tests/parameters.test (.../parameters.test) (revision cef0608bea97458e5dcd87615c9b8ca3fe7b464c) +++ tests/parameters.test (.../parameters.test) (revision b60bb4c1295b7317ecc7f42258537afa9f483a70) @@ -1726,4 +1726,24 @@ ? {o baz [expr {2 ** 64}]} "18446744073709551616" ? {o baz [expr {2 ** 128}]} "340282366920938463463374607431768211456" +} + +nx::Test case reconfigure-default { + Object create o + ? {o eval {info exists :a}} 0 + o attribute {a oldvalue} + ? {o eval {info exists :a}} 1 + ? {o a} oldvalue + # + # Kind of unintuitive, we first have to unset the objvar, then call + # reconfigure ... Can we hide the reconfigure in e.g. the slot objs + # recreate step? Or provide defaults to the ::nsf::method::setter? + # + o eval {unset :a} + ? {o eval {info exists :a}} 0 + o attribute {a newvalue} { + :reconfigure + } + ? {o eval {info exists :a}} 1 + ? {o a} newvalue } \ No newline at end of file