tests

Clone Tools
  • last updated 4 hours ago
Constraints
Constraints: committers
 
Constraints: files
Constraints: dates
- added implementation for slots with traces+types for classes - exception for incorrect defaults are thrown during slot creation - extended nsf::is, added parameter * ?-configure? -- accept configure paramter options * ?-name /name/? -- provide a parameter name for error message - simplified nx.tcl by using new nsf::is - extended regression test

  1. … 5 more files in changeset.
- added partly implementation for slots with traces+types for classes

  1. … 3 more files in changeset.
- fixed cases, where valuechangedcmd (and the other traces) did not work with "configure" method. When slot traces are used, it cleans other traces for the same operations. - extended regression test

  1. … 2 more files in changeset.
- removed some TODOs from tests/parameters.test

- parameter dispositions:

We differentiate now between "initcmd" and "cmd": an "initcmd" is only

evaluated once, but one can provide configure values for this parameter

later. a "cmd" is executed on every evaluation, it is only possible

to pass cmds to it. The trailing argument of the configure parameters

(used e.g. for scripted object/class definitions) is now of type "cmd".

Implementation not yet complete (object cases are not correct).

  1. … 5 more files in changeset.
- C-code Generator: added "-typeName" for enumeration types that allows for disambiguation of enumerations with different argument names. Before that, the argument name determined the c-type of the enumeration. Therefore it was not possible to use argName "-type" for two different functions with a different list of enumerators.

- changed "-methodtype" to simply "-type" in

/obj/ info methods ... ?-type all|scripted|builtin|alias|forwarder|object|setter|nsfproc? ...

/obj/ info object methods ... ?-type all|scripted|builtin|alias|forwarder|object|setter|nsfproc? ...

/obj/ info lookup methods ... ?-type all|scripted|builtin|alias|forwarder|object|setter|nsfproc? ...

  1. … 12 more files in changeset.
- nsf.c: handle full-qualified name for private slots (AddSlotObjects()) - extended regression test

  1. … 2 more files in changeset.
- extended parameter extractor: new functionality ::nsf::parameter get default /parameter/ ?/varname/? ::nsf::parameter get type /parameter/ /obj/ info parameter get default /parameter/ ?/varname/? /obj/ info parameter get type /parameter/

  1. … 5 more files in changeset.
- hopefully the last changes for ?object? method|variable|property: defined * "/obj/ delete object method" * "/obj/ delete object property" * "/obj/ delete object variable"

  1. … 2 more files in changeset.
- "info method syntax" returns now "/cls/ ...." - "info object method syntax" returns now "/obj/ ...."

  1. … 2 more files in changeset.
- make name fully qualified for symmetry reasons

- added new regression test info-variables.test

    • -0
    • +267
    ./info-variable.test
  1. … 2 more files in changeset.
Method and configure parameter reform, Part 3: - added

/cls/ info lookup variables -> list of handles

/obj/ info lookup object variables -> list of handles

/obj/ info variable definition|name|parameter /handle/

- nx.tcl: added forward compatible scripted implementation of "lmap"

- nsf.c: handle names for private slots in pattern provided to AddSlotObjects(),

used e.g. in "info lookup slots /pattern/"

  1. … 5 more files in changeset.
- dropped "/obj/ info slot definition /obj/" in favor of "/slotobj/ definition"

  1. … 2 more files in changeset.
- nx.tcl: handle "incremental" in slot reconfigure - nx.tcl: change defaultAccessor to "none"

  1. … 12 more files in changeset.
Method and configure parameter reform, Part 2: In order to streamline the interface further, we tried to follow the idea to use "... info /plural word/" to obtain a set of handles, and then a separate call to obtain the details. Therefore, we replaced

/cls/ info slot objects

/cls/ info slot definitions

/cls/ info slot names

/obj/ info object slot objects

/obj/ info object slot definitions

/obj/ info object slot names

/obj/ info lookup slots

by

/cls/ info slots ?-type /type/? ?-closure? ?-source all|application|baseclasses? ?/pattern/?

/obj/ info object slots ?-type /type/? ?/pattern/?

/obj/ info slot definition /obj/

/obj/ info lookup slots ?-type /type/? ?-source all|application|baseclasses? ?/pattern/?

  1. … 3 more files in changeset.
- Method and configure parameter reform

/cls/ info configure parameters ?pattern? -> list of params

/cls/ info configure syntax -> syntax output

/obj/ info method parameters /methodName/ ?/pattern/? -> list of params

/obj/ info method syntax -> syntax output

/obj/ info lookup configure parameter ?/pattern/? -> list of params

/obj/ info lookup configure syntax -> syntax output

/cls/ info parameter list|name|syntax /param/ -> value

  1. … 8 more files in changeset.
- syntax formatter: use /value/ for denoting placeholder in "... info method syntax ..."

  1. … 5 more files in changeset.
- parametersyntax: make placeholders explicit

  1. … 3 more files in changeset.
- moved "/obj/ info slot definition|..." to "/obj/ info object slot definition|..." for consistency - provided "parametersyntax()" for "object mixin" and "object filter"

  1. … 1 more file in changeset.
Fix the 86-specific tests to reflect the object-modifier reform

- added "/obj/ object variable" and "/obj/ object property"

  1. … 3 more files in changeset.
Object-method Reform: - changed interface to object specific commands by requiring an ensemble named "object". The rational behind is essentially to use always the same info command to retrieve object specific methods, no matter whether these are defined on a plain object or an a class object (does not break the "contract" what e.g. "info method" returns).

Now we define methods via:

/cls/ method foo {args} {...body...}

/cls/ object method foo {args} {...body...}

/obj/ object method foo {args} {...body...}

Similarly, aliases, forwards and mixins are defined, e.g.

/cls/ mixin add ...

/cls/ object mixin add ...

/obj/ object mixin add ...

/obj/ require object method ...

The same change propagated as well to the "info" method.

Now we have:

/cls/ info methods ...

/cls/ info object methods ...

/obj/ info object methods ...

Similar, the object parametererization uses

/cls/ create obj -object-mixin M

/cls/ create obj -object-filter f

/metacls/ create cls -mixin M1 -object-mixin M2

/metacls/ create cls -filter f1 -object-filter f2

- as a consequence,

a) "/cls/ class method ...",

"/cls/ class alias ...",

"/cls/ class forward ...",

"/cls/ class filter ...",

"/cls/ class mixin ...",

"/cls/ class info ..."

"/obj/ class method require method ..."

"/obj/ class method require public method ..."

"/obj/ class method require protected method ..."

"/obj/ class method require private method ..."

were dropped

b) "/obj/ method ....",

"/obj/ alias ....",

"/obj/ forward ...."

"/obj/ filter ...."

"/obj/ mixin ...."

"/obj/ info method*"

"/cls/ create obj -mixin M"

"/cls/ create obj -filter f"

"/obj/ method require method ..."

"/obj/ method require public method ..."

"/obj/ method require protected method ..."

"/obj/ method require private method ..."

were dropped

- added package nx::class to allow optionally the "class" notation

"/cls/ class method ..." (and friends, see (a)), and

"/cls/ class info ...

- added package nx::plain-object-method to allow optionally plain method

b) "/obj/ method ...." (and friends, see (b))

- add support to slots to use ensemble methods as setters

    • -0
    • +41
    ./plain-object-method.test
  1. … 29 more files in changeset.
- allow explicit unsetting of -per-object flag in 0-argument -flag=value notation

  1. … 2 more files in changeset.
Extending test case to cover slotassign issue

Adding a test and a temporary fix for the ::nsf::is issue in setCheckedInstVar

  1. … 1 more file in changeset.
nsf.c: - handling of method names in error messages from nsfAPI.h. Make sure that error message is generated with the actual method name.

  1. … 4 more files in changeset.
nx.tcl: - property has now a boolean non-positional argument "-config" /obj|cls/ property ?-accessor value? ?-config boolean? ?-incremental? ?-class value? spec ?initblock? in symmetry with "-accessor" (parameter option "noconfig" is still needed to flag nsf for variables that should be initialized, which are not configurable - "/obj|cls/ info slot definitions" returns a full command (containing flags and property|variable) - extended regression test

  1. … 2 more files in changeset.
- remove debug output

nsf.c: - factored out ParameterMethodForwardDispatch() to call a parameter method defined as a forwarder the smae way from "configure" and "cget" - extended regression test

  1. … 2 more files in changeset.
- improve comment