tests

Clone Tools
  • last updated 2 hours ago
Constraints
Constraints: committers
 
Constraints: files
Constraints: dates
- added tests for object specific "variable" and "attribute + application defined value checker

  1. … 1 more file in changeset.
- generic/nsf.c: Fixed [current callingmethod] for submethods (i.e., reporting submethods as calling methods, including their methodpath). Added tests covering the fix (see tests/submethods.test). - generic/nsfStack.c (CallStackMethodPath): Re-arranged the traversal slightly, to escape non-ensemble frames (eval CFRAMEs) as parts of the method path. Added test (see tests/submethods.test). - library/nx/nx.tcl: Corrected the impl of Ensemble->defaultmethod() (e.g., used self instead of current) - tests/disposition.test: Fixed test cases turned out to be false positives. Before the fixes, [current methodpath] gave non-empty results for simple object aliases.

  1. … 3 more files in changeset.
- provide error message, when method variable is a noop (e.g. no value provided and no accessor is wanted)

  1. … 2 more files in changeset.
- added support for "class variable" - added tests for "variable" + multiplicity and "class variable"

  1. … 2 more files in changeset.
- nx::Attribute: changed method 'checkInstVar' to 'setCheckedInstVar' - set only fresh variables via per-object method "variable" and "attribute" - added flag -concomplain to per-object method "variable" and "attribute" - extended regression test

  1. … 2 more files in changeset.
- add reference value in tests, update TODO

  1. … 1 more file in changeset.
- nx: factor out method createFromParameterSpec - method variable: * check default value * added shortcut, when no slot object is needed * extended regression test

  1. … 2 more files in changeset.
- generalized "nsf::object::initialized" to nsf::object::property objectName initialized|class|rootmetaclass|rootclass|slotcontainer

  1. … 4 more files in changeset.
- regularized more nsf::* names: renamed "nsf::createobjectsystem" => "nsf::objectsystem::create" renamed "nsf::unknown" => "nsf::object::unknown" renamed "nsf::dispatch" => "nsf::object::dispatch"

  1. … 12 more files in changeset.
- first draft of separation of attribute -> variable + accessor

  1. … 3 more files in changeset.
- reamed ObjectParameterSlot attribute from nosetter => accessor (positive formulation)

  1. … 3 more files in changeset.
- tests/parameters.test: Tracked down the relevant Tcl issue (fossil check-in 769801ace1) resulting in the bignum double-rounding problem, observed earlier. The work-around is setting the tcl precision level to 17. I made it applying conditionally, depending on the Tcl patch level as the work-around is not needed anymore fore 8.5.10+. - generic/nsf.c: Correct usage of TclDumpMemoryInfo() for changes in 8.5.10, introduced by fossil check-in 4a9ba46064. Memdebug builts (--enable-symbols=mem) therefore require a recent Tcl version (8.5.10+).

  1. … 1 more file in changeset.
- provide backward compatibility for unknwon method (when method contains spaces). - some minor cleanup - extended regression test

  1. … 2 more files in changeset.
- TODO: Added an entry concerning callstack introspection (as discussed today) - generic/nsf.c: Some minor renaming in NsfOConfigureMethod(); made sure that intermediate frames resulting from forward-parameter dispatches are equally marked INACTIVE. - tests/disposition.test: Added tests covering uplevel/upvar support under parameter/disposition dispatches (i.e., uplevel and upvar calls from within parameter-dispatched methods); the tests also cover XOTcl's residualargs dispatches.

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

commit 901efa4cb4e1bbd55a8c47ebb79f4c7b4b397668

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

Date: Wed Jul 6 17:51:38 2011 +0200

- generic/nsf.c: Provide the [current class] context to submethods

- tests/disposition.test: Added some tests on the interaction of

INACTIVE frames (mixin, filter) and submethods

- tests/submethods.test: Testing [current class] context for submethods

  1. … 2 more files in changeset.
- generic/nsfStack.c: Revised my former patch for traversing callstacks under ensemle dispatches. We fixed the traversal-ending gateway expression; and added transparency for INACTIVE frames when assembling the method path. Added further tests, remain to be completed ...

  1. … 2 more files in changeset.
- preliminary fix for volatile called through redsidual args - new regression test file volatile.test

  1. … 4 more files in changeset.
- Reduced verbosity in nsf.c, reactivated a test case

  1. … 1 more file in changeset.
- tests/forward.test, tests/methods.test: Remove some intermediary statements

- nsfStack.c / CallStackMethodPath(): Providing a fix for reporting method paths correctly when dispatching to ensembles from alias parameters. Prior to that fix, the intermediate (and inactive) CMETHOD frame wrapping configure() calls caused [current methodpath]s to report empty string elements. Added some test cases. - nsf.c / ObjectDispatch(), DispatchUnknownMethod(): When testing objects as alias parameter targets, I found cases when the default (C-level) unknown handler was invoked upon. The result was an unknown message which reported the delegator object as "unknown" method! This was due to injecting the delegator object into the argument vector at position 0, subsequently used by the C-level unknown handler. First, I tried to make the C-level unknown handler aware of the ensemble call context (by funneling through the CSC and frame flags) but this turned out to be complicated to achieve this simple task. As an alternative, I suggest the following patch: The first argument in unknown calls is treated as a list, and dependening on the call context (ensemble vs. non-ensemble) contains all the necessary call data. For ensemble methods, it is the delegator object, the entire method path (as returned by [current methodpath]), and the actual unknown selector. The default C-level handler, treating the call info as list, resorts to reporting the last element of the list which is always the unknown selector. Custom (ensemble-level, application-level) unknown handler can wrap and further process the information as necessary. To demonstrate the usefulness, I rewrote EnsembleObject->unknown() accordingly. I checked for Tcl_Obj leaks. - Added some tests on objects as targets of alias object parameter. To be continued.

  1. … 4 more files in changeset.
- nsf.c: * report only fully initialized slot objects via "info slots" to avoid chicken-egg problem during method "objectparameter" * added flag -array to ::nsf::var::exists to check, whether the variable is an array (to avoid "o eval {array exists ...}" in the serializer. * provided flags to VarExists instead of multiple args * don't add new pointer entries in Nsf_PointerTypeLookup()

  1. … 8 more files in changeset.
- tests/parameters.test: Slight extension of test case on a re-assignment of per-ob defaults.

- library/nx/nx.tcl: Fixed Attribute->reconfigure() to cover the reconfiguration of a default value in the per-object case ... - tests/parameters.test: Added Victor Mayevski's example as a proper test case. Details need to be discussed ...

  1. … 1 more file in changeset.
- C-code generator: * additional parameter swith "-withObj" to allow passing of internal representation and the according TclObj * * c-implemented methods: report types in "info parameter" for more builtin types. * use "-withObj" in mongodb interface * adapted regression test

  1. … 8 more files in changeset.
- generic/nsf.c: Shuffled around the word order and adding some quoting in the error message for enforcing multivalued, non-empty list multiplicities; to differentiate between parameter name and value literals etc.

  1. … 1 more file in changeset.
- tests/disposition.test: Added tests covering "dispos vs. return checker" and "dispos vs. uplevel/upvar"

- nsf.c: no good reason to disallow user defined types for for alias, forward or initcmd

  1. … 2 more files in changeset.
- generic/nsf.c: Aligned error messages for parameter options; Re-arranged control flow in ParamOptionParse() slightly, do allow for [string is] types being used as options of disposition types. Refactored code slightly (e.g., removed unneeded, intermediary Tcl_Objs). - tests/disposition.test: Extended test suite, in particular, for covering multiplicity types as parameter options of disposition types. - tests/parameters.test: Adjusting for rephrased error messages.

  1. … 1 more file in changeset.
- tests/parameters.test: Setting the precision to 17 explicitly (otherwise, comparison operations might fail due to deviating precision levels)

- nsf.c: * Don't output non-consuming procs (which are always called) via parametersyntax (shows, what a user can input) * additional command ::nsf::object::initialized to check whether an object is already initialized * new function DispatchInitMethod() similar to DispatchDefaultMethod() * let residualargs call init directly instead of doing it the inidrect way * provided ability to call init with object parameters at arbitrary times * switch from Tcl_ObjCmdProc style interface (ClientData first) to a C stype interface for DispatchDefaultMethod(), DispatchUnknownMethod() * bring cmd definitions for nsf::object in right order - extended regression test

  1. … 6 more files in changeset.