Index: tests/methods.test =================================================================== diff -u -ra5dfcb547e25f83286793ba9850b988b822adf3e -r2b56284a45054d5136ddfb67343a70655aba5666 --- tests/methods.test (.../methods.test) (revision a5dfcb547e25f83286793ba9850b988b822adf3e) +++ tests/methods.test (.../methods.test) (revision 2b56284a45054d5136ddfb67343a70655aba5666) @@ -170,9 +170,9 @@ ? {::nsf::dispatch c1 protected_object_alias} "protected_object_alias" ? {lsort [c1 info methods]} \ - "plain_object_alias plain_object_forward plain_object_method plain_object_setter public_object_alias public_object_forward public_object_method public_object_setter" + "cget plain_object_alias plain_object_forward plain_object_method plain_object_setter public_object_alias public_object_forward public_object_method public_object_setter" ? {lsort [C class info methods]} \ - "plain_object_alias plain_object_forward plain_object_method plain_object_setter public_object_alias public_object_forward public_object_method public_object_setter s3" + "cget plain_object_alias plain_object_forward plain_object_method plain_object_setter public_object_alias public_object_forward public_object_method public_object_setter s3" } C destroy @@ -336,8 +336,8 @@ } ? {C x 1} 1 ? {C x} 1 - ? {C info methods} "a" - ? {C class info methods} x + ? {lsort [C info methods]} "a cget" + ? {lsort [C class info methods]} "cget x" ? {c1 a b} {expected integer but got "b" for parameter "a"} set s(C) [C serialize] @@ -358,8 +358,8 @@ # tests should work as again ? {C x} 1 - ? {C info methods} "a" - ? {C class info methods} x + ? {lsort [C info methods]} "a cget" + ? {lsort [C class info methods]} "cget x" ? {c1 a b} {expected integer but got "b" for parameter "a"} } @@ -375,13 +375,13 @@ :create c1 } - ? {::nsf::method::delete C x} "::C: cannot delete method 'x'" - ? {::nsf::method::delete C -per-object x} "::C: cannot delete object specific method 'x'" + ? {::nsf::method::delete C x} "::C: instance method 'x' does not exist" + ? {::nsf::method::delete C -per-object x} "::C: object specific method 'x' does not exist" ? {::nsf::method::delete C foo} "" - ? {::nsf::method::delete C foo} "::C: cannot delete method 'foo'" - ? {::nsf::method::delete C bar} "::C: cannot delete method 'bar'" + ? {::nsf::method::delete C foo} "::C: instance method 'foo' does not exist" + ? {::nsf::method::delete C bar} "::C: instance method 'bar' does not exist" ? {::nsf::method::delete C -per-object bar} "" - ? {::nsf::method::delete C -per-object bar} "::C: cannot delete object specific method 'bar'" + ? {::nsf::method::delete C -per-object bar} "::C: object specific method 'bar' does not exist" } # @@ -543,10 +543,10 @@ :public method "info bar foo" {} {return [namespace current]-[namespace which info]} } - ? {o1 info methods -path} "{info foo} {info bar foo} foo a1 a2" - ? {o1 info children} "::o1::info ::o1::per-object-slot" + ? {o1 info methods -path} "{info foo} {info bar foo} foo a1 a2 {cget -a2} {cget -a1}" + ? {o1 info children} "::o1::info ::o1::per-object-slot ::o1::cget" - ? {o1 delete method bar} "::o1: cannot delete object specific method 'bar'" + ? {o1 delete method bar} "::o1: object specific method 'bar' does not exist" # For a1, we have a method and an property. We can delete the # method without the slot. ? {o1 delete method a1} "" @@ -559,7 +559,7 @@ # try to delete the property again: ? {o1 delete property a1} "::o1: cannot delete object specific property 'a1'" - ? {o1 info methods -path} "{info foo} {info bar foo} foo a2" + ? {o1 info methods -path} "{info foo} {info bar foo} foo a2 {cget -a2}" ? {o1 delete property a2} "" ? {o1 info methods -path} "{info foo} {info bar foo} foo" @@ -589,10 +589,10 @@ :property a2 } - ? {C class info methods -path} "{info foo} {info bar foo} foo a1" - ? {C info children} "::C::info ::C::slot ::C::per-object-slot" + ? {C class info methods -path} "{info foo} {info bar foo} foo a1 {cget -a1}" + ? {C info children} "::C::info ::C::slot ::C::per-object-slot ::C::cget" - ? {C class delete method bar} "::C: cannot delete object specific method 'bar'" + ? {C class delete method bar} "::C: object specific method 'bar' does not exist" ? {C class delete property a1} "" ? {C class info methods -path} "{info foo} {info bar foo} foo" @@ -607,7 +607,7 @@ ? {C class delete method "info bar foo"} "" ? {C class info methods -path} "" - ? {C info methods} "a2" + ? {C info methods} "a2 cget" ? {C info slot objects} "::C::slot::a2" } @@ -627,10 +627,10 @@ :public method "info bar foo" {} {return [namespace current]-[namespace which info]} } - ? {C info methods -path} "{info foo} {info bar foo} foo a1" + ? {C info methods -path} "{info foo} {info bar foo} foo a1 {cget -a1}" ? {C info children} "::C::slot" - ? {C delete method bar} "::C: cannot delete method 'bar'" + ? {C delete method bar} "::C: instance method 'bar' does not exist" ? {C delete property a1} "" ? {C info methods -path} "{info foo} {info bar foo} foo"