Index: TODO =================================================================== diff -u -r507acdb9edb4f73339590c097aee004401cedc45 -rf0295d889aaf71709c63243685897dc3f11048f1 --- TODO (.../TODO) (revision 507acdb9edb4f73339590c097aee004401cedc45) +++ TODO (.../TODO) (revision f0295d889aaf71709c63243685897dc3f11048f1) @@ -2046,6 +2046,9 @@ - provide warning if nonpositional argument is passed more than once +- made error messages more consistent +- improved error messages for "returns" and "nsf::is" (omit parameter name) + TODO: - check performance implications of value conflict checker Index: generic/gentclAPI.tcl =================================================================== diff -u -rf1b65a9694a721be01a9a2acaff5ee093456b2bd -rf0295d889aaf71709c63243685897dc3f11048f1 --- generic/gentclAPI.tcl (.../gentclAPI.tcl) (revision f1b65a9694a721be01a9a2acaff5ee093456b2bd) +++ generic/gentclAPI.tcl (.../gentclAPI.tcl) (revision f0295d889aaf71709c63243685897dc3f11048f1) @@ -92,14 +92,14 @@ set if [list "NsfClass *cl"] append intro \ " NsfClass *cl = NsfObjectToClass(clientData);" \n \ - { if (!cl) return NsfObjErrType(interp, objv[0], "Class", "");} + { if (!cl) return NsfObjErrType(interp, objv[0], "Class", NULL);} } object { set a [list obj] set if [list "NsfObject *obj"] append intro \ " NsfObject *obj = (NsfObject *)clientData;" \n \ - { if (!obj) return NsfObjErrType(interp, objv[0], "Object", "");} + { if (!obj) return NsfObjErrType(interp, objv[0], "Object", NULL);} } "" { set a [list] Index: generic/nsf.c =================================================================== diff -u -r507acdb9edb4f73339590c097aee004401cedc45 -rf0295d889aaf71709c63243685897dc3f11048f1 --- generic/nsf.c (.../nsf.c) (revision 507acdb9edb4f73339590c097aee004401cedc45) +++ generic/nsf.c (.../nsf.c) (revision f0295d889aaf71709c63243685897dc3f11048f1) @@ -6136,8 +6136,7 @@ } if (reversed) { - return NsfErrBadVal(interp, "superclass", "classes in dependence order", - ObjStr(arg)); + return NsfErrBadVal(interp, "superclass", "classes in dependence order", ObjStr(arg)); } while (cl->super) { @@ -7363,10 +7362,8 @@ if (paramDefs && paramDefs->returns) { Tcl_Obj *valueObj = Tcl_GetObjResult(interp); - result = ParameterCheck(interp, paramDefs->returns, valueObj, "return-value:", - rst->doCheckResults, - NULL); + rst->doCheckResults, NULL); } } else { /*fprintf(stderr, "We have no cmdPtr in cscPtr %p %s.%s", cscPtr, ObjectName(object), methodName); @@ -7966,8 +7963,7 @@ if (success == 1) { *clientData = (ClientData)objPtr; } else { - result = NsfPrintError(interp, "expected %s but got \"%s\" for parameter \"%s\"", - ObjStr(pPtr->converterArg), ObjStr(objPtr), pPtr->name); + result = NsfObjErrType(interp, objPtr, ObjStr(pPtr->converterArg), (Nsf_Param *)pPtr); } } } else { @@ -8007,8 +8003,7 @@ if (result == TCL_OK) { *clientData = (ClientData)INT2PTR(bool); } else { - NsfPrintError(interp, "expected boolean value but got \"%s\" for parameter \"%s\"", - ObjStr(objPtr), pPtr->name); + NsfObjErrType(interp, objPtr, "boolean", (Nsf_Param *)pPtr); } *outObjPtr = objPtr; return result; @@ -8025,8 +8020,7 @@ *clientData = (ClientData)INT2PTR(i); *outObjPtr = objPtr; } else { - NsfPrintError(interp, "expected integer but got \"%s\" for parameter \"%s\"", - ObjStr(objPtr), pPtr->name); + NsfObjErrType(interp, objPtr, "integer", (Nsf_Param *)pPtr); } return result; } @@ -8067,7 +8061,7 @@ Tcl_DStringAppend(dsPtr, " of type ", -1); Tcl_DStringAppend(dsPtr, ObjStr(pPtr->converterArg), -1); } - NsfObjErrType(interp, objPtr, Tcl_DStringValue(dsPtr), pPtr->name); + NsfObjErrType(interp, objPtr, Tcl_DStringValue(dsPtr), (Nsf_Param *)pPtr); DSTRING_FREE(dsPtr); return TCL_ERROR; @@ -8080,7 +8074,7 @@ if (GetObjectFromObj(interp, objPtr, (NsfObject **)clientData) == TCL_OK) { return IsObjectOfType(interp, (NsfObject *)*clientData, "object", objPtr, pPtr); } - return NsfObjErrType(interp, objPtr, "object", pPtr->name); + return NsfObjErrType(interp, objPtr, "object", (Nsf_Param *)pPtr); } static int @@ -8090,7 +8084,7 @@ if (GetClassFromObj(interp, objPtr, (NsfClass **)clientData, NULL) == TCL_OK) { return IsObjectOfType(interp, (NsfObject *)*clientData, "class", objPtr, pPtr); } - return NsfObjErrType(interp, objPtr, "class", pPtr->name); + return NsfObjErrType(interp, objPtr, "class", (Nsf_Param *)pPtr); } static int @@ -8112,7 +8106,7 @@ *outObjPtr = objPtr; /*fprintf(stderr, "convert to parameter '%s' t '%s'\n", value, pPtr->type);*/ if (*value == ':' || (*value == '-' && *(value + 1) == ':')) { - return NsfObjErrType(interp, objPtr, pPtr->type, pPtr->name); + return NsfObjErrType(interp, objPtr, pPtr->type, (Nsf_Param *)pPtr); } *clientData = (char *)ObjStr(objPtr); @@ -10975,7 +10969,7 @@ SetterCmdClientData *cd = (SetterCmdClientData*)clientData; NsfObject *object = cd->object; - if (!object) return NsfObjErrType(interp, objv[0], "object", ObjStr(objv[0])); + if (!object) return NsfObjErrType(interp, objv[0], "object", NULL); if (objc > 2) return NsfObjWrongArgs(interp, "wrong # args", object->cmdName, objv[0], "?value?"); if (cd->paramsPtr && objc == 2) { @@ -11257,7 +11251,7 @@ ForwardCmdClientData *tcd = (ForwardCmdClientData *)clientData; int result, j, inputArg = 1, outputArg = 0; - if (!tcd || !tcd->object) return NsfObjErrType(interp, objv[0], "object", ""); + if (!tcd || !tcd->object) return NsfObjErrType(interp, objv[0], "object", NULL); if (tcd->passthrough) { /* two short cuts for simple cases */ /* early binding, cmd *resolved, we have to care only for objscope */ @@ -11757,8 +11751,8 @@ if (ov[i] != elementObjPtr) { /* * The elementObjPtr differs from the input Tcl_Obj, we - * switch to the version of this handler building an output - * list. + * switch to the version of this handler building an output + * list. */ /*fprintf(stderr, "switch to output list construction for value %s\n", ObjStr(elementObjPtr));*/ @@ -14485,7 +14479,7 @@ case RelationtypeSuperclassIdx: if (!NsfObjectIsClass(object)) - return NsfObjErrType(interp, object->cmdName, "class", "relationtype"); + return NsfObjErrType(interp, object->cmdName, "class", NULL); cl = (NsfClass *)object; if (valueObj == NULL) { return ListSuperclasses(interp, cl, NULL, 0); @@ -14508,14 +14502,14 @@ NsfClass *metaClass; if (!NsfObjectIsClass(object)) - return NsfObjErrType(interp, object->cmdName, "class", "relationtype"); + return NsfObjErrType(interp, object->cmdName, "class", NULL); cl = (NsfClass *)object; if (valueObj == NULL) { return NsfPrintError(interp, "metaclass must be specified as third argument"); } GetClassFromObj(interp, valueObj, &metaClass, NULL); - if (!metaClass) return NsfObjErrType(interp, valueObj, "class", ""); + if (!metaClass) return NsfObjErrType(interp, valueObj, "class", NULL); cl->object.flags |= NSF_IS_ROOT_CLASS; metaClass->object.flags |= NSF_IS_ROOT_META_CLASS; @@ -14952,6 +14946,24 @@ } } +/* + *---------------------------------------------------------------------- + * ParamSetFromAny2 -- + * + * Convert the second argment argument (e.g. "x:integer") into the + * internal representation of a Tcl_Obj of the type parameter. The + * conversion is performed by the usual ParamParse() function, used + * e.g. for the parameter passing for arguments. + * + * Results: + * Result code. + * + * Side effects: + * Converted internal rep of Tcl_Obj + * + *---------------------------------------------------------------------- + */ + static int ParamSetFromAny2( Tcl_Interp *interp, /* Used for error reporting if not NULL. */ @@ -14981,6 +14993,13 @@ FREE(NsfParamWrapper, paramWrapperPtr); result = TCL_ERROR; } else if (result == TCL_OK) { + /*fprintf(stderr, "ParamSetFromAny2 sets unnamed %p\n",paramWrapperPtr->paramPtr);*/ + + paramWrapperPtr->paramPtr->flags |= NSF_ARG_UNNAMED; + if (*(paramWrapperPtr->paramPtr->name) == 'r') { + paramWrapperPtr->paramPtr->flags |= NSF_ARG_IS_RETURNVALUE; + /*fprintf(stderr, "ParamSetFromAny2 sets returnvalue %p\n",paramWrapperPtr->paramPtr);*/ + } TclFreeIntRep(objPtr); objPtr->internalRep.twoPtrValue.ptr1 = (void *)paramWrapperPtr; objPtr->internalRep.twoPtrValue.ptr2 = NULL; @@ -15090,7 +15109,7 @@ static int ParameterCheck(Tcl_Interp *interp, Tcl_Obj *objPtr, Tcl_Obj *valueObj, - const char *varNamePrefix, int doCheck, NsfParam **paramPtrPtr) { + const char *varNamePrefix, int doCheck, NsfParam **paramPtrPtr) { NsfParamWrapper *paramWrapperPtr; Tcl_Obj *outObjPtr = NULL; NsfParam *paramPtr; @@ -15113,14 +15132,7 @@ paramPtr = paramWrapperPtr->paramPtr; if (paramPtrPtr) *paramPtrPtr = paramPtr; - /* if (!doCheck) { - outObjPtr = valueObj; - checkedData = ObjStr(valueObj); - return TCL_OK; - }*/ - result = ArgumentCheck(interp, valueObj, paramPtr, doCheck, &flags, &checkedData, &outObjPtr); - /*fprintf(stderr, "ParamSetFromAny paramPtr %p final refcount of wrapper %d can free %d\n", paramPtr, paramWrapperPtr->refCount, paramWrapperPtr->canFree);*/ Index: generic/nsf.decls =================================================================== diff -u -rbb18837f55b64ecdaf970c9e77624bc30f4c417a -rf0295d889aaf71709c63243685897dc3f11048f1 --- generic/nsf.decls (.../nsf.decls) (revision bb18837f55b64ecdaf970c9e77624bc30f4c417a) +++ generic/nsf.decls (.../nsf.decls) (revision f0295d889aaf71709c63243685897dc3f11048f1) @@ -82,7 +82,7 @@ Tcl_Obj *clName, CONST char *procName) } declare 17 generic { - int NsfObjErrType(Tcl_Interp *interp, Tcl_Obj *nm, CONST char *type, char *parameterName) + int NsfObjErrType(Tcl_Interp *interp, Tcl_Obj *value, CONST char *type, Nsf_Param CONST *pPtr) } declare 18 generic { void NsfStackDump (Tcl_Interp *interp) Index: generic/nsf.h =================================================================== diff -u -r2cd96f38dddd3c2c2a3ab71abf68ac7f5ad7d879 -rf0295d889aaf71709c63243685897dc3f11048f1 --- generic/nsf.h (.../nsf.h) (revision 2cd96f38dddd3c2c2a3ab71abf68ac7f5ad7d879) +++ generic/nsf.h (.../nsf.h) (revision f0295d889aaf71709c63243685897dc3f11048f1) @@ -172,6 +172,8 @@ struct Nsf_Object object; } Nsf_Class; +typedef struct Nsf_Param { +} Nsf_Param; /* * Include the public function declarations that are accessible via Index: generic/nsfDecls.h =================================================================== diff -u -rbb18837f55b64ecdaf970c9e77624bc30f4c417a -rf0295d889aaf71709c63243685897dc3f11048f1 --- generic/nsfDecls.h (.../nsfDecls.h) (revision bb18837f55b64ecdaf970c9e77624bc30f4c417a) +++ generic/nsfDecls.h (.../nsfDecls.h) (revision f0295d889aaf71709c63243685897dc3f11048f1) @@ -124,8 +124,8 @@ #ifndef NsfObjErrType_TCL_DECLARED #define NsfObjErrType_TCL_DECLARED /* 17 */ -EXTERN int NsfObjErrType(Tcl_Interp *interp, Tcl_Obj *nm, - CONST char *type, char *parameterName); +EXTERN int NsfObjErrType(Tcl_Interp *interp, Tcl_Obj *value, + CONST char *type, Nsf_Param CONST *pPtr); #endif #ifndef NsfStackDump_TCL_DECLARED #define NsfStackDump_TCL_DECLARED @@ -227,7 +227,7 @@ void (*nsfDStringPrintf) (Tcl_DString *dsPtr, CONST char *fmt, va_list apSrc); /* 14 */ int (*nsfPrintError) (Tcl_Interp *interp, CONST char *fmt, ...); /* 15 */ int (*nsfErrInProc) (Tcl_Interp *interp, Tcl_Obj *objName, Tcl_Obj *clName, CONST char *procName); /* 16 */ - int (*nsfObjErrType) (Tcl_Interp *interp, Tcl_Obj *nm, CONST char *type, char *parameterName); /* 17 */ + int (*nsfObjErrType) (Tcl_Interp *interp, Tcl_Obj *value, CONST char *type, Nsf_Param CONST *pPtr); /* 17 */ void (*nsfStackDump) (Tcl_Interp *interp); /* 18 */ void (*nsfSetObjClientData) (Nsf_Object *obj, ClientData data); /* 19 */ ClientData (*nsfGetObjClientData) (Nsf_Object *obj); /* 20 */ Index: generic/nsfError.c =================================================================== diff -u -rbb18837f55b64ecdaf970c9e77624bc30f4c417a -rf0295d889aaf71709c63243685897dc3f11048f1 --- generic/nsfError.c (.../nsfError.c) (revision bb18837f55b64ecdaf970c9e77624bc30f4c417a) +++ generic/nsfError.c (.../nsfError.c) (revision f0295d889aaf71709c63243685897dc3f11048f1) @@ -142,12 +142,19 @@ } extern int -NsfObjErrType(Tcl_Interp *interp, Tcl_Obj *value, CONST char *type, char *parameterName) { +NsfObjErrType(Tcl_Interp *interp, Tcl_Obj *value, CONST char *type, Nsf_Param CONST *pPtr) { + NsfParam *paramPtr = (NsfParam *)pPtr; + int named = (paramPtr && (paramPtr->flags & NSF_ARG_UNNAMED) == 0); + int returnValue = !named && (paramPtr->flags & NSF_ARG_IS_RETURNVALUE); + + /*fprintf(stderr, "NsfObjErrType param %p named %d\n", paramPtr, named);*/ + Tcl_ResetResult(interp); - Tcl_AppendResult(interp,"expected ", type, " but got \"", ObjStr(value), "\"", - parameterName ? " for parameter \"" : "", - parameterName ? parameterName : "", - parameterName ? "\"" : "", - (char *) NULL); + Tcl_AppendResult(interp,"expected ", type, " but got \"", ObjStr(value), "\"", (char *) NULL); + if (named) { + Tcl_AppendResult(interp," for parameter \"", paramPtr->name, "\"", (char *) NULL); + } else if (returnValue) { + Tcl_AppendResult(interp," as return value", (char *) NULL); + } return TCL_ERROR; } Index: generic/nsfInt.h =================================================================== diff -u -r507acdb9edb4f73339590c097aee004401cedc45 -rf0295d889aaf71709c63243685897dc3f11048f1 --- generic/nsfInt.h (.../nsfInt.h) (revision 507acdb9edb4f73339590c097aee004401cedc45) +++ generic/nsfInt.h (.../nsfInt.h) (revision f0295d889aaf71709c63243685897dc3f11048f1) @@ -376,6 +376,8 @@ #define NSF_ARG_IS_ENUMERATION 0x4000 #define NSF_ARG_CHECK_NONPOS 0x8000 #define NSF_ARG_SET 0x10000 +#define NSF_ARG_UNNAMED 0x20000 +#define NSF_ARG_IS_RETURNVALUE 0x40000 /* Disallowed parameter options */ #define NSF_DISALLOWED_ARG_METHOD_PARAMETER (NSF_ARG_METHOD|NSF_ARG_INITCMD|NSF_ARG_RELATION) Index: generic/tclAPI.h =================================================================== diff -u -rfc4e3f5f6a94ef7324baffab90d58cd7eb513907 -rf0295d889aaf71709c63243685897dc3f11048f1 --- generic/tclAPI.h (.../tclAPI.h) (revision fc4e3f5f6a94ef7324baffab90d58cd7eb513907) +++ generic/tclAPI.h (.../tclAPI.h) (revision f0295d889aaf71709c63243685897dc3f11048f1) @@ -445,7 +445,7 @@ static int NsfCAllocMethodStub(ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) { NsfClass *cl = NsfObjectToClass(clientData); - if (!cl) return NsfObjErrType(interp, objv[0], "Class", ""); + if (!cl) return NsfObjErrType(interp, objv[0], "Class", NULL); if (objc != 2) { @@ -462,7 +462,7 @@ NsfCCreateMethodStub(ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) { ParseContext pc; NsfClass *cl = NsfObjectToClass(clientData); - if (!cl) return NsfObjErrType(interp, objv[0], "Class", ""); + if (!cl) return NsfObjErrType(interp, objv[0], "Class", NULL); if (ArgumentParse(interp, objc, objv, (NsfObject *) cl, objv[0], method_definitions[NsfCCreateMethodIdx].paramDefs, method_definitions[NsfCCreateMethodIdx].nrParameters, 1, @@ -480,7 +480,7 @@ static int NsfCDeallocMethodStub(ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) { NsfClass *cl = NsfObjectToClass(clientData); - if (!cl) return NsfObjErrType(interp, objv[0], "Class", ""); + if (!cl) return NsfObjErrType(interp, objv[0], "Class", NULL); if (objc != 2) { @@ -497,7 +497,7 @@ NsfCFilterGuardMethodStub(ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) { ParseContext pc; NsfClass *cl = NsfObjectToClass(clientData); - if (!cl) return NsfObjErrType(interp, objv[0], "Class", ""); + if (!cl) return NsfObjErrType(interp, objv[0], "Class", NULL); if (ArgumentParse(interp, objc, objv, (NsfObject *) cl, objv[0], method_definitions[NsfCFilterGuardMethodIdx].paramDefs, method_definitions[NsfCFilterGuardMethodIdx].nrParameters, 1, @@ -517,7 +517,7 @@ NsfCMixinGuardMethodStub(ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) { ParseContext pc; NsfClass *cl = NsfObjectToClass(clientData); - if (!cl) return NsfObjErrType(interp, objv[0], "Class", ""); + if (!cl) return NsfObjErrType(interp, objv[0], "Class", NULL); if (ArgumentParse(interp, objc, objv, (NsfObject *) cl, objv[0], method_definitions[NsfCMixinGuardMethodIdx].paramDefs, method_definitions[NsfCMixinGuardMethodIdx].nrParameters, 1, @@ -537,7 +537,7 @@ NsfCNewMethodStub(ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) { ParseContext pc; NsfClass *cl = NsfObjectToClass(clientData); - if (!cl) return NsfObjErrType(interp, objv[0], "Class", ""); + if (!cl) return NsfObjErrType(interp, objv[0], "Class", NULL); if (ArgumentParse(interp, objc, objv, (NsfObject *) cl, objv[0], method_definitions[NsfCNewMethodIdx].paramDefs, method_definitions[NsfCNewMethodIdx].nrParameters, 1, @@ -556,7 +556,7 @@ NsfCRecreateMethodStub(ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) { ParseContext pc; NsfClass *cl = NsfObjectToClass(clientData); - if (!cl) return NsfObjErrType(interp, objv[0], "Class", ""); + if (!cl) return NsfObjErrType(interp, objv[0], "Class", NULL); if (ArgumentParse(interp, objc, objv, (NsfObject *) cl, objv[0], method_definitions[NsfCRecreateMethodIdx].paramDefs, method_definitions[NsfCRecreateMethodIdx].nrParameters, 1, @@ -575,7 +575,7 @@ NsfClassInfoFilterguardMethodStub(ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) { ParseContext pc; NsfClass *cl = NsfObjectToClass(clientData); - if (!cl) return NsfObjErrType(interp, objv[0], "Class", ""); + if (!cl) return NsfObjErrType(interp, objv[0], "Class", NULL); if (ArgumentParse(interp, objc, objv, (NsfObject *) cl, objv[0], method_definitions[NsfClassInfoFilterguardMethodIdx].paramDefs, method_definitions[NsfClassInfoFilterguardMethodIdx].nrParameters, 1, @@ -594,7 +594,7 @@ NsfClassInfoFiltermethodsMethodStub(ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) { ParseContext pc; NsfClass *cl = NsfObjectToClass(clientData); - if (!cl) return NsfObjErrType(interp, objv[0], "Class", ""); + if (!cl) return NsfObjErrType(interp, objv[0], "Class", NULL); if (ArgumentParse(interp, objc, objv, (NsfObject *) cl, objv[0], method_definitions[NsfClassInfoFiltermethodsMethodIdx].paramDefs, method_definitions[NsfClassInfoFiltermethodsMethodIdx].nrParameters, 1, @@ -614,7 +614,7 @@ NsfClassInfoForwardMethodStub(ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) { ParseContext pc; NsfClass *cl = NsfObjectToClass(clientData); - if (!cl) return NsfObjErrType(interp, objv[0], "Class", ""); + if (!cl) return NsfObjErrType(interp, objv[0], "Class", NULL); if (ArgumentParse(interp, objc, objv, (NsfObject *) cl, objv[0], method_definitions[NsfClassInfoForwardMethodIdx].paramDefs, method_definitions[NsfClassInfoForwardMethodIdx].nrParameters, 1, @@ -634,7 +634,7 @@ NsfClassInfoHeritageMethodStub(ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) { ParseContext pc; NsfClass *cl = NsfObjectToClass(clientData); - if (!cl) return NsfObjErrType(interp, objv[0], "Class", ""); + if (!cl) return NsfObjErrType(interp, objv[0], "Class", NULL); if (ArgumentParse(interp, objc, objv, (NsfObject *) cl, objv[0], method_definitions[NsfClassInfoHeritageMethodIdx].paramDefs, method_definitions[NsfClassInfoHeritageMethodIdx].nrParameters, 1, @@ -653,7 +653,7 @@ NsfClassInfoInstancesMethodStub(ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) { ParseContext pc; NsfClass *cl = NsfObjectToClass(clientData); - if (!cl) return NsfObjErrType(interp, objv[0], "Class", ""); + if (!cl) return NsfObjErrType(interp, objv[0], "Class", NULL); if (ArgumentParse(interp, objc, objv, (NsfObject *) cl, objv[0], method_definitions[NsfClassInfoInstancesMethodIdx].paramDefs, method_definitions[NsfClassInfoInstancesMethodIdx].nrParameters, 1, @@ -687,7 +687,7 @@ NsfClassInfoMethodMethodStub(ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) { ParseContext pc; NsfClass *cl = NsfObjectToClass(clientData); - if (!cl) return NsfObjErrType(interp, objv[0], "Class", ""); + if (!cl) return NsfObjErrType(interp, objv[0], "Class", NULL); if (ArgumentParse(interp, objc, objv, (NsfObject *) cl, objv[0], method_definitions[NsfClassInfoMethodMethodIdx].paramDefs, method_definitions[NsfClassInfoMethodMethodIdx].nrParameters, 1, @@ -707,7 +707,7 @@ NsfClassInfoMethodsMethodStub(ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) { ParseContext pc; NsfClass *cl = NsfObjectToClass(clientData); - if (!cl) return NsfObjErrType(interp, objv[0], "Class", ""); + if (!cl) return NsfObjErrType(interp, objv[0], "Class", NULL); if (ArgumentParse(interp, objc, objv, (NsfObject *) cl, objv[0], method_definitions[NsfClassInfoMethodsMethodIdx].paramDefs, method_definitions[NsfClassInfoMethodsMethodIdx].nrParameters, 1, @@ -731,7 +731,7 @@ NsfClassInfoMixinOfMethodStub(ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) { ParseContext pc; NsfClass *cl = NsfObjectToClass(clientData); - if (!cl) return NsfObjErrType(interp, objv[0], "Class", ""); + if (!cl) return NsfObjErrType(interp, objv[0], "Class", NULL); if (ArgumentParse(interp, objc, objv, (NsfObject *) cl, objv[0], method_definitions[NsfClassInfoMixinOfMethodIdx].paramDefs, method_definitions[NsfClassInfoMixinOfMethodIdx].nrParameters, 1, @@ -766,7 +766,7 @@ NsfClassInfoMixinclassesMethodStub(ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) { ParseContext pc; NsfClass *cl = NsfObjectToClass(clientData); - if (!cl) return NsfObjErrType(interp, objv[0], "Class", ""); + if (!cl) return NsfObjErrType(interp, objv[0], "Class", NULL); if (ArgumentParse(interp, objc, objv, (NsfObject *) cl, objv[0], method_definitions[NsfClassInfoMixinclassesMethodIdx].paramDefs, method_definitions[NsfClassInfoMixinclassesMethodIdx].nrParameters, 1, @@ -801,7 +801,7 @@ NsfClassInfoMixinguardMethodStub(ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) { ParseContext pc; NsfClass *cl = NsfObjectToClass(clientData); - if (!cl) return NsfObjErrType(interp, objv[0], "Class", ""); + if (!cl) return NsfObjErrType(interp, objv[0], "Class", NULL); if (ArgumentParse(interp, objc, objv, (NsfObject *) cl, objv[0], method_definitions[NsfClassInfoMixinguardMethodIdx].paramDefs, method_definitions[NsfClassInfoMixinguardMethodIdx].nrParameters, 1, @@ -820,7 +820,7 @@ NsfClassInfoSubclassMethodStub(ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) { ParseContext pc; NsfClass *cl = NsfObjectToClass(clientData); - if (!cl) return NsfObjErrType(interp, objv[0], "Class", ""); + if (!cl) return NsfObjErrType(interp, objv[0], "Class", NULL); if (ArgumentParse(interp, objc, objv, (NsfObject *) cl, objv[0], method_definitions[NsfClassInfoSubclassMethodIdx].paramDefs, method_definitions[NsfClassInfoSubclassMethodIdx].nrParameters, 1, @@ -854,7 +854,7 @@ NsfClassInfoSuperclassMethodStub(ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) { ParseContext pc; NsfClass *cl = NsfObjectToClass(clientData); - if (!cl) return NsfObjErrType(interp, objv[0], "Class", ""); + if (!cl) return NsfObjErrType(interp, objv[0], "Class", NULL); if (ArgumentParse(interp, objc, objv, (NsfObject *) cl, objv[0], method_definitions[NsfClassInfoSuperclassMethodIdx].paramDefs, method_definitions[NsfClassInfoSuperclassMethodIdx].nrParameters, 1, @@ -1412,7 +1412,7 @@ NsfOAutonameMethodStub(ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) { ParseContext pc; NsfObject *obj = (NsfObject *)clientData; - if (!obj) return NsfObjErrType(interp, objv[0], "Object", ""); + if (!obj) return NsfObjErrType(interp, objv[0], "Object", NULL); if (ArgumentParse(interp, objc, objv, obj, objv[0], method_definitions[NsfOAutonameMethodIdx].paramDefs, method_definitions[NsfOAutonameMethodIdx].nrParameters, 1, @@ -1432,7 +1432,7 @@ static int NsfOCleanupMethodStub(ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) { NsfObject *obj = (NsfObject *)clientData; - if (!obj) return NsfObjErrType(interp, objv[0], "Object", ""); + if (!obj) return NsfObjErrType(interp, objv[0], "Object", NULL); if (objc != 1) { @@ -1448,7 +1448,7 @@ static int NsfOConfigureMethodStub(ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) { NsfObject *obj = (NsfObject *)clientData; - if (!obj) return NsfObjErrType(interp, objv[0], "Object", ""); + if (!obj) return NsfObjErrType(interp, objv[0], "Object", NULL); return NsfOConfigureMethod(interp, obj, objc, objv); @@ -1458,7 +1458,7 @@ static int NsfODestroyMethodStub(ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) { NsfObject *obj = (NsfObject *)clientData; - if (!obj) return NsfObjErrType(interp, objv[0], "Object", ""); + if (!obj) return NsfObjErrType(interp, objv[0], "Object", NULL); if (objc != 1) { @@ -1475,7 +1475,7 @@ NsfOExistsMethodStub(ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) { ParseContext pc; NsfObject *obj = (NsfObject *)clientData; - if (!obj) return NsfObjErrType(interp, objv[0], "Object", ""); + if (!obj) return NsfObjErrType(interp, objv[0], "Object", NULL); if (ArgumentParse(interp, objc, objv, obj, objv[0], method_definitions[NsfOExistsMethodIdx].paramDefs, method_definitions[NsfOExistsMethodIdx].nrParameters, 1, @@ -1494,7 +1494,7 @@ NsfOFilterGuardMethodStub(ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) { ParseContext pc; NsfObject *obj = (NsfObject *)clientData; - if (!obj) return NsfObjErrType(interp, objv[0], "Object", ""); + if (!obj) return NsfObjErrType(interp, objv[0], "Object", NULL); if (ArgumentParse(interp, objc, objv, obj, objv[0], method_definitions[NsfOFilterGuardMethodIdx].paramDefs, method_definitions[NsfOFilterGuardMethodIdx].nrParameters, 1, @@ -1513,7 +1513,7 @@ static int NsfOInstvarMethodStub(ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) { NsfObject *obj = (NsfObject *)clientData; - if (!obj) return NsfObjErrType(interp, objv[0], "Object", ""); + if (!obj) return NsfObjErrType(interp, objv[0], "Object", NULL); return NsfOInstvarMethod(interp, obj, objc, objv); @@ -1524,7 +1524,7 @@ NsfOMixinGuardMethodStub(ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) { ParseContext pc; NsfObject *obj = (NsfObject *)clientData; - if (!obj) return NsfObjErrType(interp, objv[0], "Object", ""); + if (!obj) return NsfObjErrType(interp, objv[0], "Object", NULL); if (ArgumentParse(interp, objc, objv, obj, objv[0], method_definitions[NsfOMixinGuardMethodIdx].paramDefs, method_definitions[NsfOMixinGuardMethodIdx].nrParameters, 1, @@ -1543,7 +1543,7 @@ static int NsfONoinitMethodStub(ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) { NsfObject *obj = (NsfObject *)clientData; - if (!obj) return NsfObjErrType(interp, objv[0], "Object", ""); + if (!obj) return NsfObjErrType(interp, objv[0], "Object", NULL); if (objc != 1) { @@ -1559,7 +1559,7 @@ static int NsfORequireNamespaceMethodStub(ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) { NsfObject *obj = (NsfObject *)clientData; - if (!obj) return NsfObjErrType(interp, objv[0], "Object", ""); + if (!obj) return NsfObjErrType(interp, objv[0], "Object", NULL); if (objc != 1) { @@ -1575,7 +1575,7 @@ static int NsfOResidualargsMethodStub(ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) { NsfObject *obj = (NsfObject *)clientData; - if (!obj) return NsfObjErrType(interp, objv[0], "Object", ""); + if (!obj) return NsfObjErrType(interp, objv[0], "Object", NULL); return NsfOResidualargsMethod(interp, obj, objc, objv); @@ -1585,7 +1585,7 @@ static int NsfOUplevelMethodStub(ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) { NsfObject *obj = (NsfObject *)clientData; - if (!obj) return NsfObjErrType(interp, objv[0], "Object", ""); + if (!obj) return NsfObjErrType(interp, objv[0], "Object", NULL); return NsfOUplevelMethod(interp, obj, objc, objv); @@ -1595,7 +1595,7 @@ static int NsfOUpvarMethodStub(ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) { NsfObject *obj = (NsfObject *)clientData; - if (!obj) return NsfObjErrType(interp, objv[0], "Object", ""); + if (!obj) return NsfObjErrType(interp, objv[0], "Object", NULL); return NsfOUpvarMethod(interp, obj, objc, objv); @@ -1605,7 +1605,7 @@ static int NsfOVolatileMethodStub(ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) { NsfObject *obj = (NsfObject *)clientData; - if (!obj) return NsfObjErrType(interp, objv[0], "Object", ""); + if (!obj) return NsfObjErrType(interp, objv[0], "Object", NULL); if (objc != 1) { @@ -1622,7 +1622,7 @@ NsfOVwaitMethodStub(ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) { ParseContext pc; NsfObject *obj = (NsfObject *)clientData; - if (!obj) return NsfObjErrType(interp, objv[0], "Object", ""); + if (!obj) return NsfObjErrType(interp, objv[0], "Object", NULL); if (ArgumentParse(interp, objc, objv, obj, objv[0], method_definitions[NsfOVwaitMethodIdx].paramDefs, method_definitions[NsfOVwaitMethodIdx].nrParameters, 1, @@ -1641,7 +1641,7 @@ NsfObjInfoChildrenMethodStub(ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) { ParseContext pc; NsfObject *obj = (NsfObject *)clientData; - if (!obj) return NsfObjErrType(interp, objv[0], "Object", ""); + if (!obj) return NsfObjErrType(interp, objv[0], "Object", NULL); if (ArgumentParse(interp, objc, objv, obj, objv[0], method_definitions[NsfObjInfoChildrenMethodIdx].paramDefs, method_definitions[NsfObjInfoChildrenMethodIdx].nrParameters, 1, @@ -1660,7 +1660,7 @@ static int NsfObjInfoClassMethodStub(ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) { NsfObject *obj = (NsfObject *)clientData; - if (!obj) return NsfObjErrType(interp, objv[0], "Object", ""); + if (!obj) return NsfObjErrType(interp, objv[0], "Object", NULL); if (objc != 1) { @@ -1677,7 +1677,7 @@ NsfObjInfoFilterguardMethodStub(ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) { ParseContext pc; NsfObject *obj = (NsfObject *)clientData; - if (!obj) return NsfObjErrType(interp, objv[0], "Object", ""); + if (!obj) return NsfObjErrType(interp, objv[0], "Object", NULL); if (ArgumentParse(interp, objc, objv, obj, objv[0], method_definitions[NsfObjInfoFilterguardMethodIdx].paramDefs, method_definitions[NsfObjInfoFilterguardMethodIdx].nrParameters, 1, @@ -1696,7 +1696,7 @@ NsfObjInfoFiltermethodsMethodStub(ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) { ParseContext pc; NsfObject *obj = (NsfObject *)clientData; - if (!obj) return NsfObjErrType(interp, objv[0], "Object", ""); + if (!obj) return NsfObjErrType(interp, objv[0], "Object", NULL); if (ArgumentParse(interp, objc, objv, obj, objv[0], method_definitions[NsfObjInfoFiltermethodsMethodIdx].paramDefs, method_definitions[NsfObjInfoFiltermethodsMethodIdx].nrParameters, 1, @@ -1717,7 +1717,7 @@ NsfObjInfoForwardMethodStub(ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) { ParseContext pc; NsfObject *obj = (NsfObject *)clientData; - if (!obj) return NsfObjErrType(interp, objv[0], "Object", ""); + if (!obj) return NsfObjErrType(interp, objv[0], "Object", NULL); if (ArgumentParse(interp, objc, objv, obj, objv[0], method_definitions[NsfObjInfoForwardMethodIdx].paramDefs, method_definitions[NsfObjInfoForwardMethodIdx].nrParameters, 1, @@ -1737,7 +1737,7 @@ NsfObjInfoHasMixinMethodStub(ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) { ParseContext pc; NsfObject *obj = (NsfObject *)clientData; - if (!obj) return NsfObjErrType(interp, objv[0], "Object", ""); + if (!obj) return NsfObjErrType(interp, objv[0], "Object", NULL); if (ArgumentParse(interp, objc, objv, obj, objv[0], method_definitions[NsfObjInfoHasMixinMethodIdx].paramDefs, method_definitions[NsfObjInfoHasMixinMethodIdx].nrParameters, 1, @@ -1756,7 +1756,7 @@ NsfObjInfoHasTypeMethodStub(ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) { ParseContext pc; NsfObject *obj = (NsfObject *)clientData; - if (!obj) return NsfObjErrType(interp, objv[0], "Object", ""); + if (!obj) return NsfObjErrType(interp, objv[0], "Object", NULL); if (ArgumentParse(interp, objc, objv, obj, objv[0], method_definitions[NsfObjInfoHasTypeMethodIdx].paramDefs, method_definitions[NsfObjInfoHasTypeMethodIdx].nrParameters, 1, @@ -1774,7 +1774,7 @@ static int NsfObjInfoHasnamespaceMethodStub(ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) { NsfObject *obj = (NsfObject *)clientData; - if (!obj) return NsfObjErrType(interp, objv[0], "Object", ""); + if (!obj) return NsfObjErrType(interp, objv[0], "Object", NULL); if (objc != 1) { @@ -1791,7 +1791,7 @@ NsfObjInfoIsMethodStub(ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) { ParseContext pc; NsfObject *obj = (NsfObject *)clientData; - if (!obj) return NsfObjErrType(interp, objv[0], "Object", ""); + if (!obj) return NsfObjErrType(interp, objv[0], "Object", NULL); if (ArgumentParse(interp, objc, objv, obj, objv[0], method_definitions[NsfObjInfoIsMethodIdx].paramDefs, method_definitions[NsfObjInfoIsMethodIdx].nrParameters, 1, @@ -1810,7 +1810,7 @@ NsfObjInfoLookupFilterMethodStub(ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) { ParseContext pc; NsfObject *obj = (NsfObject *)clientData; - if (!obj) return NsfObjErrType(interp, objv[0], "Object", ""); + if (!obj) return NsfObjErrType(interp, objv[0], "Object", NULL); if (ArgumentParse(interp, objc, objv, obj, objv[0], method_definitions[NsfObjInfoLookupFilterMethodIdx].paramDefs, method_definitions[NsfObjInfoLookupFilterMethodIdx].nrParameters, 1, @@ -1828,7 +1828,7 @@ static int NsfObjInfoLookupMethodMethodStub(ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) { NsfObject *obj = (NsfObject *)clientData; - if (!obj) return NsfObjErrType(interp, objv[0], "Object", ""); + if (!obj) return NsfObjErrType(interp, objv[0], "Object", NULL); if (objc != 2) { @@ -1845,7 +1845,7 @@ NsfObjInfoLookupMethodsMethodStub(ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) { ParseContext pc; NsfObject *obj = (NsfObject *)clientData; - if (!obj) return NsfObjErrType(interp, objv[0], "Object", ""); + if (!obj) return NsfObjErrType(interp, objv[0], "Object", NULL); if (ArgumentParse(interp, objc, objv, obj, objv[0], method_definitions[NsfObjInfoLookupMethodsMethodIdx].paramDefs, method_definitions[NsfObjInfoLookupMethodsMethodIdx].nrParameters, 1, @@ -1870,7 +1870,7 @@ NsfObjInfoLookupSlotsMethodStub(ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) { ParseContext pc; NsfObject *obj = (NsfObject *)clientData; - if (!obj) return NsfObjErrType(interp, objv[0], "Object", ""); + if (!obj) return NsfObjErrType(interp, objv[0], "Object", NULL); if (ArgumentParse(interp, objc, objv, obj, objv[0], method_definitions[NsfObjInfoLookupSlotsMethodIdx].paramDefs, method_definitions[NsfObjInfoLookupSlotsMethodIdx].nrParameters, 1, @@ -1889,7 +1889,7 @@ NsfObjInfoMethodMethodStub(ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) { ParseContext pc; NsfObject *obj = (NsfObject *)clientData; - if (!obj) return NsfObjErrType(interp, objv[0], "Object", ""); + if (!obj) return NsfObjErrType(interp, objv[0], "Object", NULL); if (ArgumentParse(interp, objc, objv, obj, objv[0], method_definitions[NsfObjInfoMethodMethodIdx].paramDefs, method_definitions[NsfObjInfoMethodMethodIdx].nrParameters, 1, @@ -1909,7 +1909,7 @@ NsfObjInfoMethodsMethodStub(ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) { ParseContext pc; NsfObject *obj = (NsfObject *)clientData; - if (!obj) return NsfObjErrType(interp, objv[0], "Object", ""); + if (!obj) return NsfObjErrType(interp, objv[0], "Object", NULL); if (ArgumentParse(interp, objc, objv, obj, objv[0], method_definitions[NsfObjInfoMethodsMethodIdx].paramDefs, method_definitions[NsfObjInfoMethodsMethodIdx].nrParameters, 1, @@ -1933,7 +1933,7 @@ NsfObjInfoMixinclassesMethodStub(ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) { ParseContext pc; NsfObject *obj = (NsfObject *)clientData; - if (!obj) return NsfObjErrType(interp, objv[0], "Object", ""); + if (!obj) return NsfObjErrType(interp, objv[0], "Object", NULL); if (ArgumentParse(interp, objc, objv, obj, objv[0], method_definitions[NsfObjInfoMixinclassesMethodIdx].paramDefs, method_definitions[NsfObjInfoMixinclassesMethodIdx].nrParameters, 1, @@ -1968,7 +1968,7 @@ NsfObjInfoMixinguardMethodStub(ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) { ParseContext pc; NsfObject *obj = (NsfObject *)clientData; - if (!obj) return NsfObjErrType(interp, objv[0], "Object", ""); + if (!obj) return NsfObjErrType(interp, objv[0], "Object", NULL); if (ArgumentParse(interp, objc, objv, obj, objv[0], method_definitions[NsfObjInfoMixinguardMethodIdx].paramDefs, method_definitions[NsfObjInfoMixinguardMethodIdx].nrParameters, 1, @@ -1986,7 +1986,7 @@ static int NsfObjInfoParentMethodStub(ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) { NsfObject *obj = (NsfObject *)clientData; - if (!obj) return NsfObjErrType(interp, objv[0], "Object", ""); + if (!obj) return NsfObjErrType(interp, objv[0], "Object", NULL); if (objc != 1) { @@ -2003,7 +2003,7 @@ NsfObjInfoPrecedenceMethodStub(ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) { ParseContext pc; NsfObject *obj = (NsfObject *)clientData; - if (!obj) return NsfObjErrType(interp, objv[0], "Object", ""); + if (!obj) return NsfObjErrType(interp, objv[0], "Object", NULL); if (ArgumentParse(interp, objc, objv, obj, objv[0], method_definitions[NsfObjInfoPrecedenceMethodIdx].paramDefs, method_definitions[NsfObjInfoPrecedenceMethodIdx].nrParameters, 1, @@ -2023,7 +2023,7 @@ NsfObjInfoVarsMethodStub(ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) { ParseContext pc; NsfObject *obj = (NsfObject *)clientData; - if (!obj) return NsfObjErrType(interp, objv[0], "Object", ""); + if (!obj) return NsfObjErrType(interp, objv[0], "Object", NULL); if (ArgumentParse(interp, objc, objv, obj, objv[0], method_definitions[NsfObjInfoVarsMethodIdx].paramDefs, method_definitions[NsfObjInfoVarsMethodIdx].nrParameters, 1, Index: library/xotcl/tests/testx.xotcl =================================================================== diff -u -rbb18837f55b64ecdaf970c9e77624bc30f4c417a -rf0295d889aaf71709c63243685897dc3f11048f1 --- library/xotcl/tests/testx.xotcl (.../testx.xotcl) (revision bb18837f55b64ecdaf970c9e77624bc30f4c417a) +++ library/xotcl/tests/testx.xotcl (.../testx.xotcl) (revision f0295d889aaf71709c63243685897dc3f11048f1) @@ -4032,7 +4032,7 @@ catch { o z3 -b abc -- -b } m - errorCheck $m {expected boolean value but got "abc" for parameter "-b"} "not boolean" + errorCheck $m {expected boolean but got "abc" for parameter "-b"} "not boolean" set ::r "" #o z4 -c 1 1 Index: tests/parameters.test =================================================================== diff -u -r531982261a0deb399b608a42d4469af3d3041399 -rf0295d889aaf71709c63243685897dc3f11048f1 --- tests/parameters.test (.../parameters.test) (revision 531982261a0deb399b608a42d4469af3d3041399) +++ tests/parameters.test (.../parameters.test) (revision f0295d889aaf71709c63243685897dc3f11048f1) @@ -41,10 +41,10 @@ ? {::nsf::is object o1} 1 ? {::nsf::is object o1} 1 ? {::nsf::is object o1000} 0 - ? {::nsf::is -complain object o1000} {expected object but got "o1000" for parameter "value"} + ? {::nsf::is -complain object o1000} {expected object but got "o1000"} ? {::nsf::is integer 1} 1 ? {::nsf::is object,type=::C c1} 1 - ? {::nsf::is -complain object,type=::C o} {expected object but got "o" for parameter "value"} + ? {::nsf::is -complain object,type=::C o} {expected object but got "o"} ? {::nsf::is object,type=::C o} 0 ? {c1 info has mixin ::M} 1 @@ -96,20 +96,20 @@ ? {::nsf::is metaclass ::nx::Class} 1 ? {::nsf::is metaclass ::nx::Object} 0 - ? {::nsf::is -complain class o1} {expected class but got "o1" for parameter "value"} + ? {::nsf::is -complain class o1} {expected class but got "o1"} ? {::nsf::is class o1} 0 ? {::nsf::is -complain class Test} 1 ? {::nsf::is -complain object,1..* [list o1 Test]} 1 ? {::nsf::is -complain integer,1..* [list 1 2 3]} 1 ? {::nsf::is -complain integer,1..* [list 1 2 3 a]} \ - {invalid value in "1 2 3 a": expected integer but got "a" for parameter "value"} + {invalid value in "1 2 3 a": expected integer but got "a"} ? {::nsf::is -complain object,type=::C c1} 1 ? {::nsf::is -complain object,type=::C o} \ - {expected object but got "o" for parameter "value"} \ + {expected object but got "o"} \ "object, but different type" ? {::nsf::is -complain object,type=::C c} \ - {expected object but got "c" for parameter "value"} \ + {expected object but got "c"} \ "no object" ? {::nsf::is -complain object,type=::nx::Object c1} 1 "general type" @@ -118,7 +118,7 @@ ? {::nsf::is -complain lower c} 1 "lower case char" ? {::nsf::is -complain lower abc} 1 "lower case chars" - ? {::nsf::is -complain lower Abc} {expected lower but got "Abc" for parameter "value"} + ? {::nsf::is -complain lower Abc} {expected lower but got "Abc"} ? {string is lower abc} 1 "tcl command 'string is lower'" ? {::nsf::is -complain {i:integer 1} 2} {invalid value constraints "i:integer 1"} @@ -329,7 +329,7 @@ ? {D create d1} "::d1 configure: required argument 'd' is missing" "check error msg" ? {D create d2 -d x -b a} \ - {expected boolean value but got "a" for parameter "-b"} \ + {expected boolean but got "a" for parameter "-b"} \ "create d2 without required argument given" D create d1 -d 1 @@ -1142,7 +1142,7 @@ ? {f1 intsarg {10 11 12}} {10 11 12} ? {f1 intsarg {10 11 1a2}} {invalid value in "10 11 1a2": expected integer but got "1a2" for parameter "x"} ? {f1 boolarg 1} 1 - ? {f1 boolarg a} {expected boolean value but got "a" for parameter "x"} + ? {f1 boolarg a} {expected boolean but got "a" for parameter "x"} ? {f1 classarg ::Foo} ::Foo ? {f1 classarg f1} {expected class but got "f1" for parameter "x"} # tcl checker Index: tests/returns.test =================================================================== diff -u -re415f4153e7750b77616795150822b91db1ba9d4 -rf0295d889aaf71709c63243685897dc3f11048f1 --- tests/returns.test (.../returns.test) (revision e415f4153e7750b77616795150822b91db1ba9d4) +++ tests/returns.test (.../returns.test) (revision f0295d889aaf71709c63243685897dc3f11048f1) @@ -33,12 +33,12 @@ ? {c1 bar-ok1 1 2} 1 ? {c1 bar-ok2 1 2} 1 - ? {c1 bar-nok 1 2} {expected integer but got "a" for parameter "return-value"} + ? {c1 bar-nok 1 2} {expected integer but got "a" as return value} ? {c1 incr x} 1 ? {c1 incr x} 10002 - ? {c1 lappend l e1} {expected integer but got "e1" for parameter "return-value"} + ? {c1 lappend l e1} {expected integer but got "e1" as return value} # query the returns value ? {::nsf::methodproperty C lappend returns} integer @@ -316,16 +316,16 @@ ? {c1 bar-ok1 1 2} 1 ? {c1 bar-ok2 1 2} 1 ? {c1 ++ 1000} 1001 - ? {c1 | a} {expected integer but got "a" for parameter "return-value"} + ? {c1 | a} {expected integer but got "a" as return value} ? {::nsf::methodproperty ::C ::nsf::classes::C::bar-nok returns} integer - ? {c1 bar-nok 1 2} {expected integer but got "a" for parameter "return-value"} + ? {c1 bar-nok 1 2} {expected integer but got "a" as return value} ? {C instances} ::c1 ? {c1 incr x} 1 ? {c1 incr x} 1002 - ? {c1 lappend l e1} {expected integer but got "e1" for parameter "return-value"} + ? {c1 lappend l e1} {expected integer but got "e1" as return value} # query the returns value ? {::nsf::methodproperty C lappend returns} integer