Fix and expand rename_camel.i testcase
The regex pattern to upper-case things containing an `i` had incorrect escaping (`\\(`...`\\)` instead of `(`...`)`) so `import` didn't get renamed. This wasn't detected because there were no `_runme` files for this testcase, so add rename_camel_runme.php which uses reflection to check the wrapped PHP classes, functions and constants are all named as expected. Also expand coverage of converting to underscore case and add coverage for converting to lower-camel-case. Related to #1041.
This commit is contained in:
parent
e1bb265bf7
commit
cf7bdcf2df
3 changed files with 64 additions and 12 deletions
13
Examples/test-suite/php/rename_camel_runme.php
Normal file
13
Examples/test-suite/php/rename_camel_runme.php
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
<?php
|
||||
|
||||
require "tests.php";
|
||||
|
||||
// We want to fail if any extra classes/function/constants are defined.
|
||||
check::werror(true);
|
||||
|
||||
check::classes(array("rename_camel","GeometryFactory","ByteOrderValues"));
|
||||
check::functions(array("CamelCase","CamelCase1","CamelCase2","CamelCase3","lowerCamelCase","lowerCamelCase1","lowerCamelCase2","lowerCamelCase3","under_case","under_case1","under_case2","under_case3","IMPORT","foo","hello"));
|
||||
check::constants(array("Hello","Hi_there","Bye","See_you"));
|
||||
|
||||
|
||||
check::done();
|
||||
Loading…
Add table
Add a link
Reference in a new issue