Commit Graph

49 Commits

Author SHA1 Message Date
Andrei Zmievski
513e598d1e Adding object aggregation capability along with tests. 2002-02-21 03:32:42 +00:00
jim winstead
831473d76e Rename finite/isinf/isnan to more standard is_*() names. 2002-01-09 23:59:05 +00:00
Derick Rethans
aee570302f - Fix bug introduced in earlier patch 2002-01-09 16:03:36 +00:00
jim winstead
4fb4c6d4b3 More tweaking of wordwrap() with the cut parameter set. It was being a
little too aggressive and cutting words without breaking at spaces
first. (A couple of tests were incorrect.)
2002-01-05 23:49:58 +00:00
jim winstead
ca15b22212 New memcpy()-based wordwrap() implementation. The simple case
(single-character break, no forced break) appears to be about 60%
faster, and there's simply no comparison for non-simple cases with
non-trivial amounts of text. The old algorithm was O(n^2) (with an
unfortunately large constant factor) because of the use of strncat(),
the new one is O(n). Added some more tests, too.
@ - Made wordwrap() significantly faster. (Jim)
# test case: $t = join('',file('ChangeLog')); $w = wordwrap($t,10,"\n",1);
# new code completes in less than a second. i'm still waiting for the
# old code to finish.
2002-01-05 20:46:43 +00:00
jim winstead
461e105069 Fixed pow(), and added finite(), isinf(), and isnan(). Also fixed
pow() tests.
@- Fixed pow(), and added finite(), isinf(), and isnan(). (Jim)
# Jeroen was on crack, and apparently flunked arithmetic. Names of new
# functions subject to change if people get persnickety about them.
# (They're currently the same as the underlying C library function
# names. Hope nobody forgets to update the tests if they change the
# names.)
# Oh, and pow() uses the new parameter-passing API now.
2002-01-05 03:45:11 +00:00
jim winstead
4b8f435b2a good grief, positive powers of 0 are well-defined. (code fix coming.) 2002-01-05 02:16:16 +00:00
Zak Greant
6823fb1fe7 Surprising how tests can fail when they don't have any supporting data :) Thanks for the catch Jan and Jim 2002-01-05 01:58:44 +00:00
jim winstead
f68b7c5f3e Fixed segfault in wordwrap() when wrapping to zero width and using
multi-character break or trying to force cut (bug #12768, now fails
and issues a warning because forcing a zero-width cut doesn't make
sense). Also converted to new paramater-passing API and avoid making
an extra copy of the return values.
# also added tests.
@- Fixed segfault in wordwrap() when wrapping to zero width and using
@  multi-character break or trying to force cut (bug #12768). (Jim)
2002-01-04 19:48:08 +00:00
Derick Rethans
ae07e93028 - Added test for recursive counting 2001-12-29 21:05:03 +00:00
Derick Rethans
6729156450 - Add test for floor and ceil 2001-12-22 11:52:56 +00:00
Zak Greant
2c9f5d8a91 Modified array_walk, arsort, asort, krsort, ksort, rsort, shuffle, sort,
uasort, uksort and usort.

Corrected prototype comments for all.

Converted to use zend_parse_parameters, except for the u.?sort functions.

Changed return values for failure from implicit NULL to explicit FALSE in
asort(), krsort(), and ksort().

Changed pval to zval in the u.?sort functions.

Added test to help ensure that fixes to code do not change function
behavior. Tests are quite large (~237k) but compress down to ~16k.
Please let me know if this is a problem!
2001-12-22 11:49:56 +00:00
Derick Rethans
d578e05f96 Mail should go to php-dev 2001-12-16 13:04:02 +00:00
Thies C. Arntzen
0fd809a770 improve last patch:
non existant object variables are now serialized as NULL, this saves us from
buffering the serialized data.
2001-12-01 15:17:50 +00:00
Thies C. Arntzen
7ff5198c53 serialized data would be incoorect if __sleep() returned a variable-name
which is non-existant in the object.
submitted by: Bernd Roemer <berndr@bonn.edu>
2001-12-01 15:06:37 +00:00
Rasmus Lerdorf
55d9b2ad9c Fix most of these tests - still think there is a bug in the long->float
conversion stuff somewhere
2001-11-13 13:12:46 +00:00
Rasmus Lerdorf
f78f4364a0 Different operating systems handle the group x bit differently, so
simplify this test to test the user x bit instead
2001-11-13 12:39:21 +00:00
Derick Rethans
6a5bcfef8d - Fix for bugs #9640 and #13789 2001-10-27 17:50:26 +00:00
Jeroen van Wolffelaar
43b3da1396 Make math tests pass, round & co don't work this way, and there was an error
in expected output
2001-10-22 09:44:27 +00:00
foobar
701b1a548e Fixed bug: #12617 2001-10-22 02:35:10 +00:00
Stig Bakken
925ff7f2b2 * remove version_{lt,le,gt,ge,eq} functions, added a third optional
parameter to version_compare doing the same thing
2001-10-11 10:35:59 +00:00
Stig Bakken
89bd184ea0 @Added version_compare() function (Stig) 2001-10-06 23:22:37 +00:00
Edin Kadribasic
26389258bb Made assert test pass on systems with short open tags disabled.
Added .cvsignore
2001-10-06 09:38:29 +00:00
Jeroen van Wolffelaar
a1c2b86701 Fix the pow-test, it now succeeds on my machine 2001-10-05 23:37:08 +00:00
Jeroen van Wolffelaar
5541451085 Add test for array_search and in_array
(should be expanded though)
2001-10-05 22:01:04 +00:00
Thies C. Arntzen
e929389eeb fix strtr() when called with two parameters. this has been broken for some time!
guys, when "optimizing" functions you _shoudl_ write a testcase for the
working function and make _sure_ that it works afterwards!
2001-09-13 10:48:41 +00:00
Stanislav Malyshev
8fd65b9f16 test big numbers too 2001-08-20 14:15:05 +00:00
foobar
d3aff0f6ee make this test work. 2001-08-18 16:47:02 +00:00
Jeroen van Wolffelaar
b3a7b945fa Fix test 2001-08-05 20:27:24 +00:00
Jeroen van Wolffelaar
71a6c03bef Didn't commit the correct trim.phpt, it now passes 2001-08-05 19:06:34 +00:00
Jeroen van Wolffelaar
860be31cae More tests 2001-08-05 18:38:48 +00:00
Jeroen van Wolffelaar
c105f7142f Better abs() testing 2001-08-04 21:40:34 +00:00
Jeroen van Wolffelaar
58ee4e47a4 Fix bug in the tests :-(
There seems to be one real bug in pow(), I'm trying to fix it...
2001-08-04 18:03:29 +00:00
Jeroen van Wolffelaar
0cf60d749e Added tests for pow()
#The tests near LONG_MAX/MIN fail, I know that
2001-08-04 13:20:31 +00:00
Thies C. Arntzen
61822fcd47 @ - assert() now accepts the array(&$obj,"methodname") syntax. (Thies)
+ some cleanups
2001-07-09 10:20:41 +00:00
Thies C. Arntzen
e7b01fc53c added test for assert 2001-07-09 09:08:14 +00:00
Thies C. Arntzen
1be0975dff added test for serialize
changed var.c to use Z_* macros
2001-07-09 09:03:06 +00:00
Sascha Schumann
d6d59a9ee5 1. st_blksize might be different for regular files and symlinks; hence
ignore differences in the twelfth element of the stat() array.

2. The 'test.file' is created by the script, thus the owner of the file
   is the user id executing the script.  A mode of 0654 does not grant
   the owner the right to execute the file and therefore, the correct
   output here is "not executable."
2001-06-21 11:15:38 +00:00
Jason Greene
7f3291ae8c Fix is_executable test. 2001-05-11 02:45:49 +00:00
Derick Rethans
b181237582 - Partial fix for bug #9050, support for "Jan 19 2000" date format 2001-05-06 18:33:49 +00:00
James Moore
7a85ec55f7 Adding microtime() tests 2001-02-04 16:56:59 +00:00
Rui Hirokawa
187828f2f2 moved to ext/iconv. 2001-01-09 15:40:49 +00:00
Zak Greant
bbf41d2116 Adding test for is_scalar(). 2000-12-18 21:24:25 +00:00
Stig Bakken
6e1e78d1c6 @Added iconv() function (using libc or libiconv) (Stig) 2000-12-15 01:01:14 +00:00
Hartmut Holzgraefe
9b1b253548 fgetcsv() will now work correct with empty fields in tab delimited files
# fix for bug #8258 and regression test
2000-12-14 14:18:36 +00:00
Hartmut Holzgraefe
63e6b0b5bf levenshtein() fixed, regression tests added (bug id #6562 and #7368)
# fallback to unoptimized version for 4.0.4 release
2000-12-13 23:26:19 +00:00
Kirill Maximov
023a95ae1c @ quoted_printable_decode() function is made RFC-2045 compliant. (Kir)
This hopefully closes bugs #5321, #7138, #7855.
  Test script for the function is added.
2000-11-17 10:55:37 +00:00
Stig Bakken
1bb90f5805 * all tests should pass now (expect for the interbase stuff that I haven't
had the chance to test)
2000-08-31 22:21:47 +00:00
Stig Bakken
315f4f5658 @PHP 3 regression testing framework re-born (Stig)
Took the old PHP 3 regression testing framework and rewrote it in PHP.
Should work on both Windows and UNIX, however I have not tested it on
Windows.  See tests/README for how to write tests.  Added the PHP 3
tests and converted most of them.
2000-08-27 19:46:06 +00:00