Class: TestParseTree

### Home Classes Methods

### In Files

- test/test_parse_tree.rb

### Parent

ParseTreeTestCase

### Methods

- #setup
- #test_process_string
- #test_process_string_newlines

### Files

- History.txt
- Manifest.txt
- README.txt

### Class/Module Index

Quicksearch

- Class
- ClassInclude
- Method
- Mod1
- Mod2
- Module
- ParseTree
- ParseTreeGauntlet
- ParseTreeTestCase
- PostUnifier
- PreUnifier
- Proc
- ProcStoreTmp
- R2RTestCase
- RawParseTree
- Something
- SomethingWithInitialize
- TestParseTree
- TestRawParseTree
- TestUnifier
- UnboundMethod
- UnifiedRuby
- Unifier

No matching classes.

# TestParseTree

### Public Instance Methods

setup() click to toggle source

    # File test/test_parse_tree.rb, line 2536
    def setup
      super
      @processor = ParseTree.new(false)
    end

test_process_string() click to toggle source

    # File test/test_parse_tree.rb, line 2541
    def test_process_string
      actual   = @processor.process '1 + nil'
      expected = s(:call, s(:lit, 1), :+, s(:arglist, s(:nil)))

      assert_equal expected, actual

      actual   = @processor.process 'puts 42'
      expected = s(:call, nil, :puts, s(:arglist, s(:lit, 42)))

      assert_equal expected, actual
    end

test_process_string_newlines() click to toggle source

    # File test/test_parse_tree.rb, line 2553
    def test_process_string_newlines
      @processor = ParseTree.new(true)
      actual   = @processor.process "1 +\n nil", false, 'test.rb', 5
      expected = s(:newline, 6, "test.rb",
                   s(:call, s(:lit, 1), :+, s(:arglist, s(:nil))))

      assert_equal expected, actual
    end

[Validate]

Generated with the Darkfish Rdoc Generator 2.