예제 #1
0
파일: VMTest.php 프로젝트: yrizos/brainfart
 public function testVM()
 {
     $vm = new VM("", 10);
     $this->assertInstanceOf("Brainfart\\VM\\Memory", $vm->getMemory());
     $this->assertInstanceOf("Brainfart\\VM\\Output", $vm->getOutput());
     $this->assertInstanceOf("Brainfart\\VM\\Input", $vm->getInput());
     $this->assertEquals(10, $vm->getLoopLimit());
 }
예제 #2
0
 /**
  * @param \Brainfart\VM\VM $vm
  */
 public function execute(VM $vm)
 {
     $vm->getMemory()->store($vm->getInput()->fetch());
 }