Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
tree: 13f193a749
Fetching contributors…

Cannot retrieve contributors at this time

31 lines (22 sloc) 0.54 kb
require 'test_helper'
module Schemer
class InterpreterTest < MiniTest::Unit::TestCase
def setup
@lexer = Lexer.new
@parser = Parser.new
end
def test_walks_the_ast_visiting_every_node
text = """
(define (double num)
(+ num num))
(write (double 12))
"""
ast = @parser.apply(@lexer.parse text)
interpreter = Interpreter.new(ast)
ast.each do |node|
node.expects(:eval).with(kind_of(Environment))
end
interpreter.walk
end
end
end
Jump to Line
Something went wrong with that request. Please try again.