use of php.runtime.Memory in project jphp by jphp-compiler.
the class IncludeTest method testSimpleInclude.
@Test
public void testSimpleInclude() {
Memory memory = includeResource("include/simple_include.php");
Assert.assertEquals("success", memory.toString());
}
use of php.runtime.Memory in project jphp by jphp-compiler.
the class IncludeTest method testRequire.
@Test
public void testRequire() {
Memory memory = includeResource("include/require.php");
Assert.assertEquals("success", memory.toString());
}
use of php.runtime.Memory in project jphp by jphp-compiler.
the class LoopsTest method testDoWhile.
@Test
public void testDoWhile() {
Memory memory = includeResource("loops/do_while.php");
Assert.assertEquals("AAAAAAAAA", memory.toString());
}
use of php.runtime.Memory in project jphp by jphp-compiler.
the class LoopsTest method testFor.
@Test
public void testFor() {
Memory memory = includeResource("loops/for.php");
Assert.assertEquals("success", memory.toString());
}
use of php.runtime.Memory in project jphp by jphp-compiler.
the class ArrayMemoryTest method testSimple.
@Test
public void testSimple() {
ArrayMemory memory = new ArrayMemory();
assertEquals(Memory.Type.ARRAY, memory.type);
assertEquals(0, memory.size());
assertEquals(-1, memory.lastLongIndex);
Memory mem = ArrayMemory.valueOf();
assertTrue(mem instanceof ArrayMemory);
assertEquals(-1, ((ArrayMemory) mem).lastLongIndex);
assertEquals(0, ((ArrayMemory) mem).size());
}
Aggregations