public void FuncStackTest() { var sut = new FuncStack(); sut.Should().NotBeNull(); sut.Stack.Should().NotBeNull(); sut.Stack.Should().BeEmpty(); }
public void PopTest() { var sut = new FuncStack(); sut.Should().NotBeNull(); sut.Push(5.AsFun()); // assume push works sut.Pop(); sut.Stack.Should().BeEmpty(); }
public void PushTest() { var sut = new FuncStack(); sut.Should().NotBeNull(); sut.Stack.Should().NotBeNull(); sut.Stack.Should().BeEmpty(); sut.Push(5.AsFun()); sut.Stack.Should().NotBeEmpty(); }
public Core(VM vm, int id) : base("Core", id) { this.vm = vm; this.native_interface = new NativeInterface(this.vm, this); this.state = new CoreState(id, new CoreErrorHandler(), 0, false, 0); this.pc = 0; this.locals = new WItem[0]; this.traceback = new TraceBack(); this.func_stack = new FuncStack(this); this.exec_stack = new ExecStack(this); }