Hello Zoe, It would be nice thing to have mapping between categorization of the functions in the php doc and the source/test tree structure but keeping the tree structure as per the source code is better thing to do. If i have got it right as of now the testcases are places based on the location of the source file. For example testcases testing functions in the ext/standard/array.c are placed in ext/standard/tests/array dir, ext/standard/tests/reg.c is placed in ext/standar/tests/reg/ dir and so on. Testcases for functions found in the Zend dir are placed in Zend/tests dir. It would be nice to have the following addition to ext/standard/tests dir with respect to variable handling functions ( varible handling funnctions are implemented by different source file,e.g : type.c, var.c, Zend/zend_builtin_functions.c, etc) : A sub dir "type" (ext/standard/tests/type) where all the testcases testing functions in type.c can be placed, currently its placed in general_functions(ext/standard/tests/general_funtions) dir A sub dir "var" (ext/standard/tests/var) where all the testcases testing functions in var.c can be placed, currently they are placed in general_functions(ext/standard/tests/general_functions) dir, and so on.
Doing this way its makes is very easy for locating a testcase and give better dir structure for test organization. It would be nice if these details were documented on php.net, May be right place is qa.php.net under the doc "how to write test". Marcus, Tony and others, Any comments from you ? Also notice that we have done commit of some string functions(strcasecmp, strcmp, strncmp) in string dir, which should have been committed in Zend/tests dir because those functions are implemented by source file placed in Zend dir. Best Regards, Raghubansh, IBM India On 5/16/07, Zoe Slattery <[EMAIL PROTECTED]> wrote:
Stanislav Malyshev wrote: > I think it does. If one needs to see which tests there are or are > there any tests that test particular thing or inspect certain aspects > of a functionality, navigating a maze of func_01234.phpt, all alike, > is a nightmare. Of course, I could open all of them one by one and > remember which one does what - that is if I were a being with > unlimited lifespan, infallible memory and never felt bored - but for > regular human it's a painful experience. So when writing a new tests > it would be very good to give them names that make sense, it doesn't > cost anything and helps people. Renaming old ones might be somewhat > boring task, so not sure anybody ever would do that... I'm happy to rename as we work through - if we can see an obvious and more descriptive name. Also, what about making the test directory structure match the functional reference for core functions? Some of it does at the moment (strings, array) but it would be good to put all the variable handling tests in ext/standard/tests/variable_handling for example. It's another thing we could do as we go along... Zoe Slattery IBM UK -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php