use of php.runtime.Memory in project jphp by jphp-compiler.
the class UserFunctionTest method testStaticVariables.
@Test
public void testStaticVariables() {
Memory memory = includeResource("user_function/static_variables.php");
Assert.assertEquals(33, memory.toLong());
}
use of php.runtime.Memory in project jphp by jphp-compiler.
the class UserFunctionTest method testBasic.
@Test
public void testBasic() {
Memory memory = includeResource("user_function/basic.php");
Assert.assertEquals(20, memory.toLong());
}
use of php.runtime.Memory in project jphp by jphp-compiler.
the class NamespacesTest method testSimple.
@Test
public void testSimple() {
Memory memory = includeResource("namespaces/simple.php");
Assert.assertEquals("success", memory.toString());
}
use of php.runtime.Memory in project jphp by jphp-compiler.
the class SimpleExpressionTest method testCallNativeFunc.
@Test
public void testCallNativeFunc() {
Memory memory = runDynamic("$i = 1; return cos($i);", false);
Assert.assertTrue(memory.toDouble() > 0.54);
}
use of php.runtime.Memory in project jphp by jphp-compiler.
the class SimpleExpressionTest method testStringBuilder.
@Test
public void testStringBuilder() {
Memory memory;
memory = runDynamic("$x = 100500; return \"foo $x bar\";", false);
Assert.assertEquals("foo 100500 bar", memory.toString());
}
Aggregations