parameters.test

Clone Tools
  • last updated 5 hours ago
Constraints
Constraints: committers
 
Constraints: files
Constraints: dates
* parameters.test: Adding two test cases to cover previously missed code branches leading to leaking NsfMethodNamePath uses.

- remove stripping of substdefault from properties

  1. … 1 more file in changeset.
- add handling of extended substdefault options to per-object variables - improve default value checking for slot-less variables - transfor associated array into a dict - extend regression tests

  1. … 2 more files in changeset.
provide error hint for "invalid value constraints" errors

  1. … 2 more files in changeset.
Fold "substdefault" and "substdefaultoptions" into a single parameter option "substdefault"

  1. … 4 more files in changeset.
* nsf.c (ParamOptionParse, ParamDefinitionParse, ParamDefsParse), parameters.test: Small "type=" converterArg reform. Provided additional parameter in param-parser machinery, to communicate a (namespace) qualifier into ParamOptionParse. This way, the unqualified type=* values are now expanded to qualified names (definition scope): method parameters, nsf::is, nsf::parseargs, setter methods. Type=* in object parameters are currently expanded at the slot level, could also be added. New tests were added, existing ones adjusted to reflect the new behaviour.

  1. … 2 more files in changeset.
Adding test cases

Adjust tests to match new behavior

- implement substdefaultoptions (for now, just providing the bitmask) - add substdefault.test - rename static function ParamParse() to ParamDefinitionParse() - break overlong lines

  1. … 4 more files in changeset.
Fix leftover from the time, when we could call accessor methods without "get"

deactivate two problematic tests for the time being to allow regression test to run

Fix typos

  1. … 63 more files in changeset.
* nsf.c (NsfParseArgsCmd): Fix another edge case (empty spec and/or empty argv), added more tests. See also TODO.

  1. … 1 more file in changeset.
* nsf.c (NsfParseArgsCmd): Fix nsf::parseargs for the case of Tcl-only params, otherwise, it crashes due to an uninitialized params structure. Added some tests.

  1. … 1 more file in changeset.
* nx.tcl (substdefault): Unify and harden substdefault handling. Both, per-class and per-object substdefault should now behave similarly in absence of a pair of evaluation brackets. Also, an attempt is made to capture ill-formed input to subst earlier ([info complete]). An actual substdefault reform, however, must tackle the [subst] calls (-novariables?) and make the calls more robust (at the script and C level; [apply]-like?). Added some tests for documentation.

  1. … 1 more file in changeset.
WIP

  1. … 1 more file in changeset.
parameters.test: Simplify test case slightly.

* nx.tcl (MetaSlot.parseParameterSpec): Refine handling of the type converter to expand unqualified names to the "nearer" namespace (i.e., namespace of the slot-owning object) rather than "". Along the way, intercept invalid type=* values earlier (empty string, "::"). Added some tests.

  1. … 1 more file in changeset.
* nx.tcl (MetaSlot.parseParameterSpec): Refine handling of the type converter to expand unqualified names to the "nearer" namespace (i.e., namespace of the slot-owning object) rather than "". Along the way, intercept invalid type=* values earlier (empty string, "::"). Added some tests.

  1. … 1 more file in changeset.
* nsf.c, parameters.test (NsfMethodSetterCmd): Make list detection aware of all list separator chars (NsfHasTclSpace).

  1. … 1 more file in changeset.
* nsf.c, parameters.test (NsfOResidualargsMethod): Extend XOTcl's list-notation support to recognize all Tcl list separators (NsfHasTclSpace).

  1. … 1 more file in changeset.
Improve spelling

  1. … 43 more files in changeset.
* nx.tcl (VariableSlot): Fix value=delete to actually accept and implement "-nocomplain". Added tests (missing so far entirely) and updated the man pages accordingly.

  1. … 6 more files in changeset.
* nx.tcl, parameters.test (defineIncrementalOperations): Make sure value=add and value=delete actually run value checkers and, in case of "convert", pick up the conversion result. Added basic test.

  1. … 1 more file in changeset.
Prepare value=* reform in tests

  1. … 2 more files in changeset.
* nsf.c (ArgumentCheck): Avoid double dispatching to value checkers (built-in and type=*) for "slotset" parameters. Previously, configure and then the value=set (value=add) method triggered one dispatch each. Now, the configure pass skips the check and shifts sole responsibility on the value=set/ value=add methods. Added basic test cases to parameters.test to capture the intended call semantics.

  1. … 1 more file in changeset.
* nsf.c (ArgumentCheck): Avoid double dispatching to value checkers (built-in and type=*) for "slotset" parameters. Previously, configure and then the value=set (value=add) method triggered one dispatch each. Now, the configure pass skips the check and shifts sole responsibility on the value=set/ value=add methods. Added basic test cases to parameters.test to capture the intended call semantics.

  1. … 1 more file in changeset.
* nx.tcl, parameters.test (Object->object variable): Support for substdefault has been entirely missing so far. Added basic tests

  1. … 1 more file in changeset.
- remove spurious blank in error message - fix typo in print string

  1. … 3 more files in changeset.
- fix one case in interaction between get-trace and default value

  1. … 1 more file in changeset.