Index: tests/parameters.test =================================================================== diff -u -N -red365a90fa455e82a281fc1b4bfaa4b96081da12 -rbf61b8a8f97eca59bf8f63ba673a1d32ce55e92e --- tests/parameters.test (.../parameters.test) (revision ed365a90fa455e82a281fc1b4bfaa4b96081da12) +++ tests/parameters.test (.../parameters.test) (revision bf61b8a8f97eca59bf8f63ba673a1d32ce55e92e) @@ -1350,8 +1350,16 @@ ? {::nsf::method::setter o -x} {invalid setter name "-x" (must not start with a dash or colon)} } +nx::test case setters-wrongargs { + nx::Object create o + ::nsf::method::setter o z + ? {o z -10} -10 + ? {o z} -10 + ? {o z -1 0} {wrong # args should be "::o z ?value?"} +} + ####################################################### # test for slot-optimizer ####################################################### @@ -2709,6 +2717,13 @@ } +nx::test case noconfig-switch-interaction { + catch {nx::Object new { :object property x:switch,noconfig; :configure -x=1}} msg opts + ? [list string match "invalid non-positional argument '-x=1',*" [dict get $opts -errorinfo]] 1 + catch {nx::Class new { :property y:switch,noconfig; :new -y=1}} msg opts + ? [list string match "invalid non-positional argument '-y=1',*" [dict get $opts -errorinfo]] 1 +} + # # testing method properties #