swig/Examples/test-suite/php/enum_scope_template_runme.php
Nihal a687b020e2 Refactor code and change change enum_scope_template test to use class enums. Fix few test cases.
- Change enum_scope_template test to use class enums.
- Move the conversion of void* of ptr in swig wrapper to class pointer to Lib files.
- Synchronize between old and new flow. Old flow to accept newly created objects,
with the use of a new property SWIG_classWrapper to newly created objects.
- ZEND_BEGIN_ARG_INFO_EX to hold exact number of arguments required.
- Fix the constructor overloading bug in the in-house Swig_class_overload_dispatch function
- Add helper function to check if the class is wrapped.
- Add ZEND_ACC_ABSTRACT to virtual functions to make the class abstract.
- Change how wname is selected for staticmemberfn.
- Helper function to get names without namespace getNameWithoutNamespace.
- Fix bugs on class entry level at class handler.
  - Move all entry level code to class handler from class decleration.
  - Checking if base.item is null before using it.
  - Check if the parent class is wrapped before using its class entry.
2017-08-18 08:54:05 +05:30

15 lines
588 B
PHP

<?php
require "tests.php";
require "enum_scope_template.php";
check::classes(array("enum_scope_template", "TreeInt"));
check::functions(array("chops","treeint_chops"));
check::equal(0,TreeInt::Oak,"0==TreeInt_Oak");
check::equal(1,TreeInt::Fir,"1==TreeInt_Fir");
check::equal(2,TreeInt::Cedar,"2==TreeInt_Cedar");
check::equal(TreeInt::Oak,chops(TreeInt::Oak),"TreeInt_Oak==chops(TreeInt_Oak)");
check::equal(TreeInt::Fir,chops(TreeInt::Fir),"TreeInt_Fir==chops(TreeInt_Fir)");
check::equal(TreeInt::Cedar,chops(TreeInt::Cedar),"TreeInt_Cedar==chops(TreeInt_Cedar)");
check::done();
?>