Index: tests/parameters.test =================================================================== diff -u -r85ee1fdb043ed3f82fd272cc004c476c40861fdb -r12319faaf20df7116346558bd948b0edda9124eb --- tests/parameters.test (.../parameters.test) (revision 85ee1fdb043ed3f82fd272cc004c476c40861fdb) +++ tests/parameters.test (.../parameters.test) (revision 12319faaf20df7116346558bd948b0edda9124eb) @@ -4,6 +4,9 @@ #::nx::configure defaultMethodCallProtection false +set ::trailer "-object-mixin:mixinreg,slot=::nx::Object::slot::object-mixin,slotassign,method=object-mixin,0..n -class:class,alias,method=::nsf::methods::object::class -object-filter:filterreg,alias,method=::nx::Object::slot::__object::filter,0..n __initblock:cmd,optional,noleadingdash" + + nx::test case dummy { ? {::namespace current} :: set o [Object create o] @@ -44,7 +47,7 @@ } C create c1 nx::Class create M - c1 object mixin M + c1 object mixin set M ? {::nsf::object::exists o1} 1 ? {::nsf::object::exists o1000} 0 @@ -275,7 +278,7 @@ C create c1 ? {C eval :__objectparameter} \ - "{-superclass:class,alias,method=::nsf::methods::class::superclass,1..n ::nx::Object} -mixin:mixinreg,alias,0..n -filter:filterreg,alias,0..n -object-mixin:mixinreg,alias,method=::nx::Object::slot::__object::mixin,0..n -class:class,alias,method=::nsf::methods::object::class -object-filter:filterreg,alias,method=::nx::Object::slot::__object::filter,0..n __initblock:cmd,optional,noleadingdash" + "{-superclass:class,alias,method=::nsf::methods::class::superclass,1..n ::nx::Object} -mixin:mixinreg,slot=::nx::Class::slot::mixin,slotassign,method=class-mixin,0..n -filter:filterreg,alias,0..n -object-mixin:mixinreg,slot=::nx::Object::slot::object-mixin,slotassign,method=object-mixin,0..n -class:class,alias,method=::nsf::methods::object::class -object-filter:filterreg,alias,method=::nx::Object::slot::__object::filter,0..n __initblock:cmd,optional,noleadingdash" #### TOOD: remove or add #? {c1 eval :__objectparameter} \ @@ -307,7 +310,7 @@ "::D::slot::d ::C::slot::a ::C::slot::b ::C::slot::c" ? {d1 eval :__objectparameter} \ - "-d:required -a -b:boolean {-c 1} -object-mixin:mixinreg,alias,method=::nx::Object::slot::__object::mixin,0..n -class:class,alias,method=::nsf::methods::object::class -object-filter:filterreg,alias,method=::nx::Object::slot::__object::filter,0..n __initblock:cmd,optional,noleadingdash" + "-d:required -a -b:boolean {-c 1} $::trailer" } ####################################################### @@ -333,32 +336,32 @@ nx::Class create M2 { :property b2 } - D mixin M + D mixin set M ? {d1 eval :__objectparameter} \ - "-b -m1 -m2 -d:required -a {-c 1} -object-mixin:mixinreg,alias,method=::nx::Object::slot::__object::mixin,0..n -class:class,alias,method=::nsf::methods::object::class -object-filter:filterreg,alias,method=::nx::Object::slot::__object::filter,0..n __initblock:cmd,optional,noleadingdash" \ + "-b -m1 -m2 -d:required -a {-c 1} $::trailer" \ "mixin added" - M mixin M2 + M mixin set M2 ? {d1 eval :__objectparameter} \ - "-b2 -b -m1 -m2 -d:required -a {-c 1} -object-mixin:mixinreg,alias,method=::nx::Object::slot::__object::mixin,0..n -class:class,alias,method=::nsf::methods::object::class -object-filter:filterreg,alias,method=::nx::Object::slot::__object::filter,0..n __initblock:cmd,optional,noleadingdash" \ + "-b2 -b -m1 -m2 -d:required -a {-c 1} $::trailer" \ "transitive mixin added" - D mixin "" + D mixin set "" #we should have again the old interface ? {d1 eval :__objectparameter} \ - "-d:required -a -b:boolean {-c 1} -object-mixin:mixinreg,alias,method=::nx::Object::slot::__object::mixin,0..n -class:class,alias,method=::nsf::methods::object::class -object-filter:filterreg,alias,method=::nx::Object::slot::__object::filter,0..n __initblock:cmd,optional,noleadingdash" + "-d:required -a -b:boolean {-c 1} $::trailer" - C mixin M + C mixin set M ? {d1 eval :__objectparameter} \ - "-b2 -b -m1 -m2 -d:required -a {-c 1} -object-mixin:mixinreg,alias,method=::nx::Object::slot::__object::mixin,0..n -class:class,alias,method=::nsf::methods::object::class -object-filter:filterreg,alias,method=::nx::Object::slot::__object::filter,0..n __initblock:cmd,optional,noleadingdash" \ - "mixin added" - C mixin "" + "-b2 -b -m1 -m2 -d:required -a {-c 1} $::trailer" \ + "mixin added" + C mixin set "" #we should have again the old interface ? {d1 eval :__objectparameter} \ - "-d:required -a -b:boolean {-c 1} -object-mixin:mixinreg,alias,method=::nx::Object::slot::__object::mixin,0..n -class:class,alias,method=::nsf::methods::object::class -object-filter:filterreg,alias,method=::nx::Object::slot::__object::filter,0..n __initblock:cmd,optional,noleadingdash" + "-d:required -a -b:boolean {-c 1} $::trailer" } ####################################################### @@ -1901,13 +1904,13 @@ nx::Class create M1 {:property b1:required} nx::Class create M2 {:property b2:required} - ? {c1 eval :__objectparameter} "-a1 -object-mixin:mixinreg,alias,method=::nx::Object::slot::__object::mixin,0..n -class:class,alias,method=::nsf::methods::object::class -object-filter:filterreg,alias,method=::nx::Object::slot::__object::filter,0..n __initblock:cmd,optional,noleadingdash" + ? {c1 eval :__objectparameter} "-a1 $::trailer" - c1 object mixin M1 + c1 object mixin set M1 ? {c1 info precedence} "::M1 ::C ::nx::Object" - ? {c1 eval :__objectparameter} "-b1:required -a1 -object-mixin:mixinreg,alias,method=::nx::Object::slot::__object::mixin,0..n -class:class,alias,method=::nsf::methods::object::class -object-filter:filterreg,alias,method=::nx::Object::slot::__object::filter,0..n __initblock:cmd,optional,noleadingdash" + ? {c1 eval :__objectparameter} "-b1:required -a1 $::trailer" # # Invalidate the object parameter and expect that the per-class @@ -1960,7 +1963,7 @@ # # drop the mixins, the b* properties should be gone. # - c1 object mixin "" + c1 object mixin set "" ? {c1 info object mixin classes} {} ? {lsort [c1 info lookup configure parameters b*]} "" @@ -2001,15 +2004,15 @@ nx::Class create D -superclass C nx::Class create M {:property b1:required} - c1 object mixin M + c1 object mixin set M ? {c1 info precedence} "::M ::C ::nx::Object" ? {C info slots -closure} \ "::C::slot::a1 ::nx::Object::slot::__initblock ::nx::Object::slot::object-mixin ::nx::Object::slot::class ::nx::Object::slot::object-filter" ? {c1 eval :__objectparameter} \ - "-a2 -b1:required -a1 -object-mixin:mixinreg,alias,method=::nx::Object::slot::__object::mixin,0..n -class:class,alias,method=::nsf::methods::object::class -object-filter:filterreg,alias,method=::nx::Object::slot::__object::filter,0..n __initblock:cmd,optional,noleadingdash" + "-a2 -b1:required -a1 $::trailer" # # invalidate object parameter and expect that the per-class mixin @@ -2025,7 +2028,7 @@ ? {C info slots -closure} \ "::C::slot::a1 ::nx::Object::slot::__initblock ::nx::Object::slot::object-mixin ::nx::Object::slot::class ::nx::Object::slot::object-filter" - ? {c1 eval :__objectparameter} "-a2 -b1:required -a1 -object-mixin:mixinreg,alias,method=::nx::Object::slot::__object::mixin,0..n -class:class,alias,method=::nsf::methods::object::class -object-filter:filterreg,alias,method=::nx::Object::slot::__object::filter,0..n __initblock:cmd,optional,noleadingdash" + ? {c1 eval :__objectparameter} "-a2 -b1:required -a1 $::trailer" # should not require b1 ? {C create c2} ::c2