methods.test

Clone Tools
  • last updated 6 hours ago
Constraints
Constraints: committers
 
Constraints: files
Constraints: dates
WIP; rewrite NsfCallStackFindCallingContext

  1. … 1 more file in changeset.
Extend up-reform to uplevel, introduce NsfCallstackFindCallingContext, added tests

  1. … 3 more files in changeset.
make test more robust ("file lstat" returns less data under windows)

add regression test for testing the behavior of :upvar from toplevel tclsh with and without filters

This test covers implicitly also the behavior of [current callinglevel].

improve spelling

  1. … 4 more files in changeset.
* nsf.c (NextSearchAndInvoke): Relax the pre-conditions, objv can actually be NULL (see test cases). Besides, the assertion was not reflected by a corresponding nonnull constraints on the NextSearchAndInvoke prototype.

  1. … 1 more file in changeset.
execution namespace reform: - add execution namespace to proc context instead of altering the namespace of the command - this fixes strange behavior of "info commands ::o::p", which might have returned "::p" - provide compatibility with Tcl 8.7a2 - extend regression test

  1. … 3 more files in changeset.
* nsf.c, nsfInt.h: Start housekeeping work on Tcl command/proc names vs. NSF method names to avoid conflicts between ensemle methods and e.g. whitespace-containing command names. Added helper macro NsfHasTclSpace and some first tests. To be continued.

  1. … 2 more files in changeset.
* methods.test: Add basic tests on composite names under the default unknown handler.

Prepare value=* reform in tests

  1. … 2 more files in changeset.
nx::Class unknown: rewritte unknown message to include '?...?'

  1. … 5 more files in changeset.
Tests: Adjust the test suite for the latest rewording of the nx::Class unknown message

  1. … 4 more files in changeset.
DispatchUnknownMethod(): Make sure that arcane method names make it into proper unknown error mesages (incl. names representing invalid Tcl lists); tests included; checked by valgrind

  1. … 2 more files in changeset.
Having a working version, test for leaks

  1. … 1 more file in changeset.
Adding some missing test on recently added introspection methods

  1. … 1 more file in changeset.
- nx: added options "-debug" and "-deprecated" to methods "method" and "obejct method", such one can use e.g. C public method -deprecated bar {} {return 1} - extended regression test

  1. … 2 more files in changeset.
- nx: added new introspection options /cls/ info method debug /cls/ info method deprecated /obj/ info object method debug /obj/ info object method deprecated - extended regression test

  1. … 3 more files in changeset.
- new introspection methods: "/obj/ info object method callprotection /m/" "/cls/ info method callprotection /m/" - extended regression test

  1. … 3 more files in changeset.
nx.tcl: pluralism reform part 3 - introduced simple plural form "mixins" and "filters" for introspection - moved differentiated interface into slot methods. the slot methods "get" stay symmetrically to "set", but additional methods "classes" or "methods" are used like "guard" to obtain partial results of the mixin and filter specs - changed info methods /cls/ info mixin classes -> /cls/ info mixins /cls/ info filter methods -> /cls/ info filters /obj/ info object mixin classes -> /obj/ info object mixins /obj/ info object filter methods -> /obj/ info object filters - dropped /cls/ info mixin guard /cls/ info filter guard /obj/ info object mixin guard /obj/ info object filter guard - added /cls/ mixin classes /cls/ filter methods /obj/ object filter methods /obj/ object mixin classes

  1. … 14 more files in changeset.
nx.tcl: pluralism reform part 2 - changed methods /cls/ info subclass -> /cls/ info subclasses /cls/ info superclass -> /cls/ info superclasses /cls/ mixin ... -> /cls/ mixins /cls/ filter ... -> /cls/ filters /cls/ object mixin ... -> /cls/ object mixins /cls/ object filter ... -> /cls/ object filters - changed configure parameters /cls/ configure -mixin -> /cls/ configure -mixins /cls/ configure -filter -> /cls/ configure -filters /obj/ configure -object-mixin -> /obj/ configure -object-mixins /obj/ configure -object-filter -> /obj/ configure -object-filters - added handling for calling relationslot with unknown sub method

  1. … 31 more files in changeset.
nsf.c: parameter passing reform - don't pass full argument list for filteing methods calle further methods from C (such as new/create/... ) to allow processing of e.g. "--" in "new" to separate arguments to "new" cleanly from arguments passed to "create". Now we can use e.g. "C new -- -childof 123" in case class C has a property "childof". - extend c-generator to accept option "-objv0" to pass the original "objv[0]" to the called command. Since we had previously "allargs", we have to pass the objv[0] now differently - more thorough checking ISOBJ(someObj) macro for asserts (use "assert(ISOBJ(someObj))" instead of just "assert(someObj)") - extend regression test

  1. … 11 more files in changeset.
Saving away the ad hoc changes to fix method-path generation

  1. … 6 more files in changeset.
- fixed error message for forward ... onerror and method paths. The command "C object mixin" returns now "::C object mixin add|clear|delete|get|guard|set" and not "::C mixin add|clear|delete|get|guard|set" as before.

  1. … 2 more files in changeset.
- use "mixin|filter clear" instead of "mixin|filter unset"

  1. … 4 more files in changeset.
nx.tcl: - reworked error message generation of slot-forwarder (list all available slot methods with prefix value=)

xotcl2:

- use xotcl::RelationSlot instead of nx::Relationslot in xotcl2

(we can more value=assign here).

  1. … 3 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: - use set/get/add as slot methods for get/configure/incremental operations - demangle slots for nx/xotcl2 further

xotcl2:

- use assign/get/add as slot methods for get/configure/incremental

operations

- use object system configuration for -slot.get and -slot.set

  1. … 8 more files in changeset.
- enforce usage of "get" for all slots in nx - TODO: check, what in detail "parameter" in xtocl2 inherit from nx::variableslot (e.g. needsForwarder?)

  1. … 4 more files in changeset.
- put test cases for all kind of mix setter / getter together in one test case

nx.tcl: - add "set" as a method name for relation slots - implemented relation slot "mixin" and "object-mixin" via "slotassign" to disallow "/obj/ mixin /value/" and "/obj/ object mixin /value/" to use instead "/obj/ mixin set /value/" and "/obj/ object mixin set /value/" while keeping "configure" and "cget" working. This has the advantage that "/obj/ mixin set" does not try to replace the mixin chain by "set" - adapted regression test - TODO: check, if we need the explicit "slotassign"? isn't the presence of the slotObj sufficient? maybe "-forwardToSlot" in relationSlots? - TODO: demangle "slotassign" in "ObjectParameterSlot protected method getParameterOptions" and check interactions - TODO: to the same as -mixin and -object-mixin to -filter and -object-filter - TODO: clean up relation slot mixin variants - TODO: do we really like the fact that we have to write now "B mixin set M2" instead of "B mixin M2"? - TODO: should we disallow "B mixin" and enforce instead of "B mixin get" ? - TODO: we could as well allow "B mixin clear" instead of "B mixin set {}" - TODO: allow "set" for variable slots as well. Do we need "assign"?

  1. … 14 more files in changeset.