tests

Clone Tools
  • last updated 13 hours ago
Constraints
Constraints: committers
 
Constraints: files
Constraints: dates
Accomplishments: - Completed a first version of the sandboxed (partial) evaluation of Tcl source artifacts (packages, script files, C extensions) based on a dedicated child/slave interp environment: see ::nx::doc::Sandbox; the test suite and the test documentation builts run on it. - Based on this infrastructure, we can now generate a snapshot of a program's structure to be documented (and contrast it to the explicitly documented structure). - Added simplistic css sprites for visualising the doc entity status (extra, missing, mismatch, complete); see also library/lib/doc-assets/status.svg and library/lib/doc-assets/status.png - The entity status is printed optionally along with the print name of an entity - Added switch-like parts to represent properties of doc entities: @deprecated, @stashed, @c-implemented, @syshook. The implementation and use of ::nx::doc::SwitchAttribute should be reviewed after having figured out how to proceed using "switching" objparams. - I provide a multi-property dispatcher as doc-syntactic sugar and for mere convenience: @property

Various:

- Corrected some div-boxing mess in the templates

- Added a filtered helper to process entity collections

- Made the mixin layer infrastructure more symmetric (a revoke operation).

- Added tracers for ::nsf::method and ::nsf::alias (remains to be completed)

- Renamed ::nx::doc to ::nx::processor and turned it into another

mixin layer to trace the doc entity creation in e.g. readin()

- Companion (*.nxd) files: Revised the handling of companion

files. Temporarily moved generic/nsf.nxd in the top-level

directory. We need to find a permanent place as its location is

currently derived from the location of the shared extension. A

candidate is doc/ but this is not linked to the shared extension

location at all.

- processor.readin() now returns a collection of entities created

during its execution.

- Improved robustedness and orthogonality: destroy hooks; the

tag-dispatcher can now handle empty comment lines; when placing NSF

object tracer, we now use the freshly added introspection of an

object system's method aliases.

  1. … 12 more files in changeset.
- improve robustness of varresolver for unconfigured objects

  1. … 1 more file in changeset.
- Fixed switching between INACTIVE_MIXIN frames to ACTIVE_MIXIN frames - Extended regression test

  1. … 2 more files in changeset.
- added regression test for forwarder and returns

  1. … 1 more file in changeset.
- changed returns syntax from '->' to '-returns'

  1. … 2 more files in changeset.
- nx.tcl: removed debugging output - nx.tcl: added syntactic sugar to "method" and "alias" for return value checking. One can write now: Class create C { :public method foo {a:int b:int} -> int { return [expr {$a + $b}] } } - extended regression test

  1. … 2 more files in changeset.
- changed relation handling by evaluating the relationcmd in the parent context to keep evaluation order. - extend introspection "nsf::configure objectsystem": the command returns now all system methods in the syntax of nsf::createobjectsystem - "nsf::createobjectsystem" creates now a warning when an existing objectsystem is redefined and ignores the new definition attempt. This was done with the purpose to allow "package forget nx; package require nx" - Allow overwriting of redefine protected method during bootstrap to ease "package forget nx; package require nx" - forward had just "-objscope", no general "-frame method|object". Since forwarder have client data, they always push a method frame. So, the situation is different to nsd::alias and ::nsf::dispatch. Therefore, the flag "-objscope" was renamed to "-objectframe" to provide better consistency with "-frame object" - fixed bug, where error handling of invalid options in ForwardProcessOptions() could lead to a crash - return forwardoption "-earlybinding" via instrospection - extended regression test

  1. … 9 more files in changeset.
- perform relation handling in objectparameters outside of object-frame

  1. … 2 more files in changeset.
- disallow object parameter of type "switch" to avoid possible confusion between (a) providing a value for the o.p., (b) calling it as a setter, and (c) calling it as a getter. For providing a value, no arg is used for switch. For calling a setter, it is necessary to provide a value even for a switch. - disallow type "switch" in setter definiton (use boolean instead) - disallow type "switch" for positional arguments (use boolean instead) - extended regression test

  1. … 4 more files in changeset.
- Make sure that DispatchDestroyMethod() calls as well protected destructors - New function NSCheckNamespace() as replacement for NSCheckForParent() - pass parentNsPtr around instead of recomputing it in NSCheckForParent() - removed unneeded argument from NSGetFreshNamespace() - switched to dstring operations in NameInNamespaceObj() (seems slightly faster) - factored out NSRequireParentObject() - by the measures above, we obtained some speed improvements - moved some more debug output to be controlled by the debuglevel - extended regression test with testcases for creation of parent objects via method "__unknown"

  1. … 3 more files in changeset.
- provide error message, when provided setter name starts with a colon

  1. … 2 more files in changeset.
Squashed commit of the following:

commit 370f47d26099dd8cda4125de67048461edb797a9

Author: ssoberni <stefan.sobernig@wu-wien.ac.at>

Date: Thu Nov 4 10:56:11 2010 +0100

Due to recent changes in InterpColonVarResolver() to handle the

slow-path execution the byte-compiled [variable], an unwanted

interaction between ::nsf::setter, *certain* per-object namespaces,

and the ColonCmd()-based invocation of setter methods became

visible. In short: Given a pre-existing Tcl namespace and the

colon-prefixed call specification to a setter method,

InterpColonVarResolver() handles the var resolution request issued by

the setter method (or SetInstVar(), more precisely). In a

colon-prefixed call, the Tcl_Obj carrying the setter method name and

used to lookup the object variable contains the ":". At the same time,

the per-object namespace causes the TCL_NAMESPACE_ONLY flag to be set

which causes InterpColonVarResolver() to pass on the request. In this

setting, we end up with colon-prefixed object variables! See

tests/parameter.test for an explanatory test case. For the time being,

I fixed this by preserving and using the original, colon-free Tcl_Obj

indicating the variable name in the client data structure of the

settercmd.

  1. … 1 more file in changeset.
- show "unwind unstacked entry" message appear only when debug level>0 - removed fixed TODO entries

  1. … 2 more files in changeset.
- fix a bug, where "o configure" (without arguments) resetted initialied values to the defaults.

  1. … 3 more files in changeset.
- added "nosetter" automatically, when attribute "<name>:method" is used

  1. … 2 more files in changeset.
- improving error messages from argument parser - test "namespace current" and "self" in "contains" and "slots" regression test

  1. … 4 more files in changeset.
- added new contains definition based on "apply" instead of "namespace eval". Main intention is to replace SKIP_LEVELS by SKIP_LAMBDA - added functionality to use ":attribute contains:method,nosetter" - added regression test for contains and attributes of type method

  1. … 5 more files in changeset.
- fixed scoping issue, when "-volatile" was used for object creation - added regression test for interaction between filters and function resolver (and volatile) - reactivated new volatile test in destroy.test - undone temporary fixes for volatile in serializer and nx.tcl

  1. … 5 more files in changeset.
- fixed langauge hooks for emacs

- added deavtivated test for volatile via flag (unsetteled issue)

- changed CallStackGetActiveProcFrame() to return also CMETHD frames This allows to execute :volatile in a initcmd and to delete the object at its end. As a consequence, code like [CopyHandler new -volatile] copy [::nsf::self] $newName has to be changed to CopyHandler new { :copy [:uplevel ::nsf::self] [uplevel set newName] :destroy } - renamed CallStackUseActiveFrames() to CallStackUseActiveFrame() and ctx->framesSaved to ctx->frameSaved to reflect implementation

  1. … 5 more files in changeset.
- added regression tests for destroy-during-init

  1. … 1 more file in changeset.
- renamed nx regression tests .test to follow tcl conventions

    • -0
    • +402
    ./info-method.test
    • -0
    • +185
    ./interceptor-slot.test
    • -0
    • +312
    ./method-modifiers.test
  1. … 21 more files in changeset.
- extended regression tests for aliases to procs

  1. … 1 more file in changeset.
- allowed public|protected for method deletion such as "Object public method foo {} {}" - removed defaultMethodCallProtection in alias test

  1. … 2 more files in changeset.
- Adding some tests on the interactions between our var resolvers and link-creating commands: [variable], [upvar], [global], ... - Amended the in-code documentation for InterpColonVarResolver(), InterpCompiledColonVarResolver() and CompiledColonVarFetch(). - Found another AVOID_RESOLVERS victim: [namespace which -variable /varName/]

  1. … 1 more file in changeset.
- Providing a fix (and some analysis documentation) for the prefixed-(":")-variable resolution, making the entire mechanism more robust under situations of var resolvers for compiled and non-compiled script execution interacting. - Added a first sample test (which documents the motivating issue observed for AOLserver vs. NaviServer) - Further testing and documenting are pending

  1. … 1 more file in changeset.
- make sure not to return CompiledLocal vars from InterpColonVarResolver() when TCL_NAMESPACE_ONLY is requested. - delegate always from InterpColonVarResolver() to other resolvers, when TCL_NAMESPACE_ONLY is requested.

  1. … 2 more files in changeset.
- follow current Tcl vonvention for patchlevel var: - changed name of ::nsf::patchlevel to ::nsf::patchLevel - changed content ::nsf::patchLevel from eg .0 to full number including release details

- fixed bug in ::variable with colon-prefixed name

(shadowCommands does not help, see above)

- removed traces of Nsf_VariableObjCmd()

- extended regression test

  1. … 7 more files in changeset.
- Corrected the link generation for autocomplete/search entries in case of @use chaining and made them location-independent - Removed an superfluous div-closing tag in class.html.tmpl - Refactored the backend code for the auto-completion search box, separating the concerns of rendering the JS array of hashes and serialising entities into a dict representation. The latter allows to discriminate entity-specific rendering behaviour (together with the mixin layer facility). - Added the entity type (its pretty name) to the search results presented to the doc user. - Removed the unwanted "::"s from @project and @package names.

  1. … 5 more files in changeset.