summaryrefslogtreecommitdiffstats
path: root/tests/expr.test
Commit message (Collapse)AuthorAgeFilesLines
* * libtommath/bn_mp_sqrt.c (bn_mp_sqrt): Handle the case whereKevin B Kenny2008-10-051-1/+22
| | | | | | | * tests/expr.test (expr-47.13): a number's square root is between n<<DIGIT_BIT and n<<DIGIT_BIT+1. [Bug 2143288] Thanks to Malcolm Boffey (malcolm.boffey@virgin.net) for the patch.
* * generic/tclBasic.c (ExprAbsFunc): Revised so that the abs()dgp2008-03-101-1/+19
| | | | | | * tests/expr.test: function and the [::tcl::mathfunc::abs] command do not return the value of -0, or equivalent values with more alarming string reps like -1e-350. [Bug 1893815].
* merge stable branch onto HEADdgp2007-12-131-1/+1
|
* * generic/tclIOCmd.c: Revise [open] so that it interprets leadingdgp2007-10-151-7/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | zero strings passed as the "permissions" argument as octal numbers, even if Tcl itself no longer parses integers in that way. * unix/tclUnixFCmd.c: Revise the "-permissions" [file attribute] so that it interprets leading zero strings as octal numbers, even if Tcl itself no longer parses integers in that way. * generic/tclCompExpr.c: Corrections to code that produces * generic/tclUtil.c: extended "bad octal" error messages. * tests/cmdAH.test: Test revisions so that tests pass whether or * tests/cmdIL.test: not Tcl parses leading zero strings as octal. * tests/compExpr-old.test: * tests/compExpr.test: * tests/compile.test: * tests/expr-old.test: * tests/expr.test: * tests/incr.test: * tests/io.test: * tests/lindex.test: * tests/link.test: * tests/mathop.test: * tests/parseExpr.test: * tests/set.test: * tests/string.test: * tests/stringComp.test:
* * generic/tclExecute.c (TclExecuteByteCode): Added code to handleKevin B Kenny2007-08-251-2/+122
| | | | | | | * tests/expr.test (expr-23.48-53) integer exponentiation that results in 32- and 64-bit integer results, avoiding calls to wide integer exponentiation routines in this common case. [Bug 1767293]
* * generic/tclExecute.c: Corrected improper use of bignum argumentsdgp2007-08-081-1/+5
| | | | * tests/expr.test: to *SHIFT operations. [Bug 1770224].
* Improved error reporting in test expr-47.12Kevin B Kenny2006-12-061-8/+18
|
* TIP#299 IMPLEMENTATIONKevin B Kenny2006-12-011-1/+92
|
* TIP#274 IMPLEMENTATIONdgp2006-11-051-1/+4
| | | | | * generic/tclParseExpr.c: Exponentiation operator is now * tests/expr.test: right associative. [Patch 1556802]
* * generic/tclExecute.c (INST_MOD): Corrected improper testing ofdgp2006-10-301-1/+14
| | | | | * tests/expr.test: the sign of bignums when applying Tcl's division rules. Thanks to Peter Spjuth. [Bug 1585704]
* * tests/*.test: updated all tests to refer explicitly to thetip_278_20061009Miguel Sofer2006-10-091-7/+7
| | | | | | | | | | | | | | global variables ::errorInfo, ::errorCode, ::env and ::tcl_platform: many were relying on the alternative lookup in the global namespace, that feature is tested specifically in namespace and variable tests. The modified testfiles are: apply.test, basic.test, case.test, cmdIL.test, cmdMZ.test, compExpr-old.test, error.test, eval.test, event.test, expr.test, fileSystem.test, for.test, http.test, if.test, incr-old.test, incr.test, interp.test, io.test, ioCmd.test, load.test, misc.test, namespace.test, parse.test, parseOld.test, pkg.test, proc-old.test, set.test, switch.test, tcltest.test, thread.test, var.test, while-old.test, while.test.
* * generic/tclExecute.c: Corrected error in INST_LSHIFT in thedgp2006-09-281-1/+3
| | | | | | | | * tests/expr.test: calculation done to determine whether a shift in the (long int) type is possible. The calculation had literal value "1" where it needed a value "1L" to compute the correct result. Error detected via testing with the math::bigfloat package [Bug 1567222]
* * generic/tclExecute.c (INST_EXPON): Native type overflow detectiondgp2006-09-191-1/+7
| | | | | | | * tests/expr.test: was completely broken. Falling back on use of bignums for all non-trivial ** calculations until native-type-constrained special cases can be done carefully and correctly. [Bug 1561260].
* * generic/tclExecute.c: Corrected INST_EXPON flaw that treateddgp2006-09-111-4/+5
| | | | * tests/expr.test: $x**1 as $x**3. [Bug 1555371]
* * tests/expr-old.test: The remaining failing tests reported indgp2006-08-311-2/+2
| | | | | | * tests/expr.test: [Bug 1381715] are all new in Tcl 8.5, so there's really no issue of compatibility with Tcl 8.4 result to deal with. Fixed by updating tests to expect 8.5 results.
* * tests/compExpr-old.test: Update existing tests to not faildgp2006-08-221-248/+177
| | | | | | | | | | | * tests/compExpr.test: with the new expr parser. * tests/compile.test: * tests/expr-old.test: * tests/expr.test: * tests/for.test: * tests/if.test: * tests/parseExpr.test: * tests/while.test:
* * tests/compExpr-old.test: add 'oldExprParser' constraint to all testsdas2006-08-021-61/+65
| | | | | | | | | | | * tests/compExpr.test: that depend on the exact format of the error * tests/compile.test: messages of the pre-2006-07-05 expression * tests/expr-old.test: parser. The constraint is on by default (i.e. * tests/expr.test: those test still fail), but it can be turned * tests/for.test: off by passing '-constraints newExprParser' * tests/if.test: to tcltest, which will skip the 196 failing * tests/parseExpr.test: tests in the testsuite that are caused by * tests/while.test: the new expression parser error messages.
* * generic/tclExecute.c: Corrected flawed overflow detection indgp2006-07-261-1/+5
| | | | | * tests/expr.test: INST_EXPON that caused [expr 2**64] to return 0 instead of the same value as [expr 1<<64].
* * generic/tclParseExpr.c: Completely new expression parserdgp2006-07-051-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | that builds a parse tree instead of operating with deep recursion. This corrects reports of stack-blowing crashes parsing long expressions [Bug 906201] and replaces a fundamentally O(N^2) algorithm with an O(N) one [RFE 903765]. The new parser is better able to generate error messages that clearly report both the nature and context of the syntax error [Bugs 1029267, 1381715]. For now, the code for the old parser is still present and can be activated with a "#define OLD_EXPR_PARSER 1". This is for the sake of a clean implementation patch, and for ease of benchmarking. The new parser is non-recursive, so much lighter in stack consumption, but it does use more heap, so there may be cases where parsing of long expressions that succeeded with the old parser will lead to out of memory panics with the new one. There are still more improvements possible on that point, though significant progress may require changes to the Tcl_Token specifications documented for the public Tcl_Parse*() routines. ***POTENTIAL INCOMPATIBILITY*** for any callers that rely on the exact (usually terrible) error messages generated by the old parser. This includes a large number of tests in the test suite. * generic/tclInt.h: Replaced TclParseWhiteSpace() with * generic/tclParse.c: TclParseAllWhiteSpace() which is what * generic/tclParseExpr.c: all the callers really needed. Breaking whitespace runs at newlines is useful only to the command parsing function, and it can call the file scoped routine ParseWhiteSpace() to do that. * tests/expr-old.test: Removed knownBug constraints that masked * tests/expr.test: failures due to revised error messages. * tests/parseExpr.test:
* * tests/compExpr-old.test: Updated testmathfunctions constraintdgp2006-04-061-2/+2
| | | | | | | | | | * tests/compExpr.test: to post-TIP-232 world. * tests/expr-old.test: * tests/expr.test: * tests/info.test: * tests/indexObj.test: Corrected other test errors revealed by * tests/upvar.test: testing outside the tcltest application.
* * generic/tclExecute.c: Corrections to INST_EXPON detection ofdgp2006-03-251-1/+2
| | | | overflow to use mp_int calculations.
* * generic/tclExecute.c: Revised INST_EXPON implementation to dodgp2006-03-241-1/+7
| | | | | calculations in native types as much as possible, moving to mp_ints only when necessary.
* Added knownBug constraints.dgp2006-03-211-2/+2
|
* * tests/compile.test: Updated tests with changed behaviordgp2005-11-091-140/+146
| | | | | | | | | * tests/execute.test: due to addition of bignums. * tests/expr-old.test: * tests/expr.test: * tests/parseExpr.test: * tests/platform.test: * tests/string.test:
* * tests/expr.test: Portable tests expr-46.13-18 [Bug 1341368]dgp2005-11-081-2/+26
|
* * expr.test (expr-46.13): Added test that illustratesdgp2005-11-011-1/+4
| | | | shortcoming of Patch 1340260.
* Marked some failing tests as knownBug until they can be updated.dgp2005-10-211-8/+8
|
* Marked several failing tests as "knownBug" until they can be updated.dgp2005-10-211-13/+13
|
* TIP#237 IMPLEMENTATIONdgp2005-10-081-2/+246
| | | | | | [kennykb-numerics-branch] Resynchronized with the HEAD; at this checkpoint [-rkennykb-numerics-branch-20051008], the HEAD and kennykb-numerics-branch contain identical code.
* renumber expr-39.* to expr-46.*Kevin B Kenny2005-08-291-13/+13
|
* fix test case bracing and numberingKevin B Kenny2005-08-291-10/+10
|
* removed inappropriate swizzling of tcl_precisionKevin B Kenny2005-08-291-3/+1
|
* Bug 1275043Kevin B Kenny2005-08-291-1/+75
|
* Remove extra blank lines between tests so groups go together better.dkf2005-08-241-220/+1
|
* further untangling of Tcl_Finalize, and test cleanup on Win32 threadedKevin B Kenny2005-08-101-2/+3
|
* Handle abs(-0x80000000) [Bug 1241572]Kevin B Kenny2005-08-051-1/+5
|
* * tests/compExpr-old.test: Still more conversion of "nonPortable"dgp2005-07-281-109/+108
| | | | | | | | | | | | | * tests/error.test: tests into tests with constraints that * tests/expr-old.test: describe the limits of their * tests/expr.test: portability. Also more consolidation * tests/fileName.test: of constraint synonyms. * tests/format.test: wideis64bit, 64bitInts => wideIs64bit * tests/get.test: wideIntegerUnparsed => wideIs32bit * tests/load.test: wideIntExpressions => wideBiggerThanInt * tests/obj.test: * tests/parseExpr.test: Dropped "roundOffBug" constraint that * tests/string.test: protected from buggy sprintf.
* * tests/expr.test: Consolidated equivalent constraints intodgp2005-07-271-184/+177
| | | | | | | | | * tests/fileName.test: single definitions and (more precise) names: * tests/get.test: longis32bit, 32bit, !intsAre64bit => longIs32bit * tests/listObj.test: empty => emptyTest; winOnly => win * tests/obj.test: intsAre64bit => longIs64bit Also updated some "nonPortable" tests to use constraints that mark precisely what about them isn't portable, so the tests can run where they work.
* * generic/tclExecute.c (TclExecuteByteCode):mdejong2005-07-091-1/+969
| | | | | | | | | | | | | | | | | Reimplement long and wide type integer division and modulus operations so that the smallest and largest integer values are handled properly. The divide operation is more efficient since it no longer does a modulus or negation and only checks for a remainder when the quotient will be a negative number. The modulus operation is now a bit more complex because of a number of special cases dealing with the smallest and largest integers. * tests/expr.test: Add test cases for division and modulus operations on the smallest and largest integer values for 32 and 64 bit types. [Patch 1230205]
* * generic/tclExecute.c (TclExecuteByteCode):mdejong2005-06-291-1/+252
| | | | | | | | | | | When parsing an integer operand for a unary minus expression operator, check for a wide integer that is actually LONG_MIN. If found, convert it back to a long int type. * tests/expr.test: Add constraint for 32bit long int type and 64bit wide int type. Add tests that parse the smallest/largest long int and wide int values.
* TIP#182 IMPLEMENTATION [Patch 1165062]dgp2005-05-251-2/+65
| | | | | | | * doc/mathfunc.n: New built-in math function bool(). * generic/tclBasic.c: * tests/expr.test: * tests/info.test:
* Merged kennykb-numerics-branch back to the head; TIPs 132 and 232Kevin B Kenny2005-05-101-54/+4339
|
* * generic/tclExecute.c (ExponLong, ExponWide): fixed special caseMiguel Sofer2005-05-101-1/+4
| | | | 'i**0' for i>0 [Bug 1198892]
* Fix for [Bug 761471]; NaN is now *never* equal to NaN...dkf2004-11-011-1/+6
|
* Basic tests for TIPs #201 and #212dkf2004-10-081-1/+18
|
* Stop words starting with 'eq' or 'ne' from being subdivided by the expressiondkf2004-10-041-1/+9
| | | | parser. [Bug 884830]
* Report compilation errors at runtime, [Patch 103368] by dgp.Miguel Sofer2004-09-261-47/+43
|
* Fix spelling of test names...dkf2004-09-241-21/+21
|
* Some tests were non-portable, alas.dkf2004-09-191-3/+3
|
* Fix silly mistakes :} and make sure that the original bug is a test case.dkf2004-09-181-3/+4
|