tests

Clone Tools
  • last updated 16 hours ago
Constraints
Constraints: committers
 
Constraints: files
Constraints: dates
xotcl regression test: Added a more complex test for testing "new" + volatile

- improved error message "not allowed to have default": make clear, this is from a parameter specification - added object property "autonamed" (set automatically for objects created via "new") - xotcl2 volatile: improved backward compatibility with XOTcl 1 - extended regression test

  1. … 4 more files in changeset.
add comment and improve linebreak

Fix typos

  1. … 62 more files in changeset.
- fix testx (filterGuards); when compiled without assertions, a test case was skipped, that created an object "b"; the following test produced different results when b was created or recreated - avoid global

xotcl2: - added "-returns" flag to XOTcl's instprocs/procs and methods, very similar to "-returns" in nx - extended serializer to handle "-returns" flag - extended regression test

  1. … 3 more files in changeset.
Slot trace reform: - redesign of slot interface of traces from * variables contains cmds and variable references to * slot specific methods with the same interface as slot-setters - new: * specify flag "-trace" with a list of values "get", "set", "default" * when flag is set, a trace will be registered calling methods value=get obj variable value=set obj variable value value=default obj variable on the slot (actually the first two are identical with the methods used for slot-defined accessors) - updated regression test * new flag "-notrace" for "nsf::var::set" and "nsf::var::get"

  1. … 9 more files in changeset.
serializer: - added handling of "-debug" and "-deprecated" in serializer - allow export of nsfprocs via "exportMethods declaration" in order to keep otherwise excluded cmds in the result. this allows us to keep nsf::debug::* or nsf::deprecated definitions in the blueprint in OpenACS. - hardened serializer (use e.g. "::namespace" instead of "namespace" when there is a potential conflict with a method named "namespace", prefer nsf::directdispatch, etc.) - extended regression test

  1. … 3 more files in changeset.
nsf.c, gentclAPI.tcl: - new argument types "virtualobjectargs" and "virtualclassargs" for context-specific argument resolutions: when a context object is provided, arguments of type "virtualobjectargs" are determined based on the slots applicable for the object (like "... lookup ..."), arguments of type "virtualclassargs" are resolved against a class. These types are used as follows: /obj/ configure /virtualobjectargs/ /cls/ create /name/ /virtualclassargs/ /cls/ recreate /name/ /virtualclassargs/ /cls/ new ?-childof /obj/? /virtualclassargs/ This new feature allows us to provide better error messages and to make much of the "... info ... configure parameter ..." infrastructure much less important. - For "virtualclassargs" we need the functionality to obtain from the C-Code based on a class the configure parameters applicable to objects of this class. - add argument "-context ..." to "cmd::info" to pass the context object (so far the only place where the context-object is used) - object system configuration parameters changes: new: -class.configureparameter new: -object.configureparameter removed: -class.objectparameter

  1. … 15 more files in changeset.
nsf.c - force again literal "-guard" in a "mixinreg" type to avoid potential confusions - Base nsfRelationSet for mixins on cmds rather than TclObjs to avoid confusions and duplication of guard detection logic - Add interp to NsfMixinregGet() and NsfFilterregGet() to be able to return error messages - return more error message from mixinreg converter - provide at least minimal support for "funny class names" (i.e. containing spaces) - FinalObjectDeletion: don't enforce namespace = 1 for cases with wierd namespace deletion order - extended regression test

  1. … 5 more files in changeset.
xotcl2: - use value=set instead of value=assign - simplify "-parameter" implementation - add setters for "name", "domain", and "default" to xotcl::Attribute for backward compatibility

  1. … 4 more files in changeset.
nx.tcl, xotcl2.tcl: - use value=* as names for interally called and forwarder-called accessor methods - disallow "assign" for nx::variableSlots

  1. … 12 more files in changeset.
nx.tcl: - remove setter methods from BootstrapVariableSlots - reducing interface of BootstrapVariableSlots by setting methods protected

  1. … 5 more files in changeset.
- finalize dropping of setter methods for nx

  1. … 9 more files in changeset.
- add fixes for tcl 8.6

  1. … 1 more file in changeset.
nsf.c: - change name of enumeratorConverterEntry to Nsf_EnumeratorConverterEntry, move it with NSF_ARG_* flags to tcl.h to make it available in derived modules using the converter - Added editor hints for a more uniform appearance

  1. … 40 more files in changeset.
xotcl2: - fixed "... info defaults ..." and "... info instdefaults ..." emulation in XOTcl 2 - fixed error message - extended regression test - bumped revision of nsf/xotcl/nx to 2.0b6

  1. … 8 more files in changeset.
- don't call postcondition, when the command/invariant have returned already an error

  1. … 2 more files in changeset.
- keep packages versions from 2.0 and 1.0 disjoint

  1. … 28 more files in changeset.
- reduce variable scopes

  1. … 3 more files in changeset.
nx::test: - change test cases to newer interface - don't use "namespace import nx::*" in test cases when not required

  1. … 32 more files in changeset.
- when creation with an required configure parameter failed, delete the half-baked object to avoid confusing states.

  1. … 4 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. … 8 more files in changeset.
- syntax formatter: use /value/ for denoting placeholder in "... info method syntax ..."

  1. … 11 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

  1. … 43 more files in changeset.
Property Reform Part 2: better handling of per-object properties nsf.c: - changed "/class/ __objectconfigure" to "/obj/ __objectconfigure" to be able to handle per-object properties on classes properly. - renamed "info method parametersyntax" -> "info method syntax" - renamed "/obj|cls/ info method parametersyntax" into "/obj|cls/ info method syntax" - replaced "::nsf::methods::class::info::objectparameter" by "::nsf::methods::object::info::objectparameter" - new command "::nsf::parameter::specs ?-configure? ?-noposargs? slotobjs": convert provided slotobjs into a list of parameter specs - new command "::nsf::parameter::get list|name|syntax parameterspec": convert parameter spec into syntax form, or retrieve pieces of information from it (can be extended in the future) - added more or less generic list handling functions TclObjListFreeList(), TclObjListNewElement() and TclObjListAdd() used by "::nsf::parameter::specs" - replaced "::nsf::method::property /obj/ -per-object /name/ slotcontainer ?value?" by "::nsf::object::property /obj/ slotcontainer ?value?" - added "::nsf::object::property /obj/ hasperobjectslots ?value?"

nx.tcl:

- new info methods

* "/obj/ info lookup parameter definitions"

* "/obj/ info lookup parameter names"

* "/obj/ info lookup parameter list"

* "/obj/ info lookup parameter syntax"

- changed "/cls/ info parameter definition ?name?"

into "/cls/ info parameter definitions ?name?"

since ir returns a list. Still, "list" or "syntax" won't

be plural

  1. … 17 more files in changeset.
nsf.c: - fixed parmeter syntax for required nonpos args - deactivate deletion of methods via nsf::object::delete during shutdown to avoid missing slot forwarders called from destructors

  1. … 5 more files in changeset.
xotcl2.tcl: - made destructor of Connection more robust such it does not depend on accessor methods.

  1. … 5 more files in changeset.
- Addressed a number of issues in the NX slot infrastructure (which revealed themselves when running Mark's BusinessActivities implementation in XOTcl2 mode): - generic/nsf.c: Initcmd blocks (as set for registering per-class slot traces) were subjected to argument checks causing unexpected behavior (e.g., attempts of unboxing initcmds as Tcl lists or of checking initcmds against value types). This was fixed by exempting NSF_ARG_INITCMD params from argument checking in ArgumentCheck() explicitly. - library/nx/nx.tcl: For per-class parameters, the use of valuechangedcmd effectively overruled the default value specified (simply because the generated initcmd holding the trace statements took the place of the default value). While for defaultcmd and for valuecmd the parallel use of default is forbidden, the valuechangedcmd semantics allow for specifying a default, in principle. This was fixed by providing a default-setting statement in the initcmd. - tests/parameters.test: Added tests to cover the above (and beyond). - library/xotcl/library/xotcl2.tcl: Extended the backwards compatibility of the hybrid XOTcl2/NX slots infrastructure to the XOTcl 1 interface: This includes support for inline -proc statements and instvar. This compat level corresponds to the slot interface as documented (by examples) in the XOTcl language ref and the manual. - library/xotcl/tests/slottest.xotcl: Added tests for the above compat enhancements.

  1. … 4 more files in changeset.
Most issues resolved, however, the ordering of default vs. traces is pending

  1. … 4 more files in changeset.