1
0
mirror of https://github.com/gnosygnu/xowa.git synced 2026-03-02 03:49:30 +00:00

XOMW: Start XomwMessage [#632]

This commit is contained in:
gnosygnu
2020-05-04 08:29:37 -04:00
parent 0d917bccc7
commit f9cf49c160
13 changed files with 2946 additions and 1470 deletions

View File

@@ -371,6 +371,24 @@ public class XophpArray__tst {
, XophpArray_.array_filter(array, callbackOwner.NewCallback("array_filter_both"), XophpArray_.ARRAY_FILTER_USE_BOTH)
);
}
@Test public void reset() {
// PHP examples
// Example #1 reset() example
XophpArray array;
array = XophpArray.New("step one", "step two", "step three", "step four");
// by default, the pointer is on the first element
Gftest.Eq__str("step one", (String)XophpArray.current(array));
// skip two steps
XophpArray.next(array);
XophpArray.next(array);
Gftest.Eq__str("step three", (String)XophpArray.current(array));
// reset pointer, start again on step one
XophpArray.reset(array);
Gftest.Eq__str("step one", (String)XophpArray.current(array));
}
}
class XophpArray__fxt {
public XophpArray Make() {return new XophpArray();}