Hi Tom On Tuesday 25 April 2006 16:46, Thomas E Enebo wrote: > If you understand this code you can create some simple > unit tests to add to testPositions and I can likely figure those out (or > help you figure them out).
I studied the code and wrote a test for the ClassVarDeclNode, InstAsgnNode and
LocalAsgnNode which fail as expected. To the fixing, should I try to do it or
are you going to take a look at it?
Mirko
list = [
nil,
['ClassNode', 0, 6, 0, 81],
['Colon2Node', 0, 0, 6, 9],
['ScopeNode', 1, 5, 20, 77],
['BlockNode', 1, 5, 20, 77],
nil,
['ClassVarDeclNode', 1, 1, 13, 24],
['FixnumNode', 1, 1, 24, 24],
nil,
['DefnNode', 2, 5, 28, 77],
['ArgumentNode', 2, 2, 32, 34],
['ArgsNode', 2, 3, 35, 36],
['ScopeNode', 3, 4, 45, 70],
['BlockNode', 3, 4, 45, 70],
nil,
['InstAsgnNode', 3, 3, 40, 54],
['DStrNode', 3, 3, 54, 55],
['DStrNode', 3, 3, 54, 54],
['StrNode', 3, 3, 49, 54],
nil,
['LocalAsgnNode', 4, 4, 60, 71],
['FixnumNode', 4, 4, 71, 71]
]
test_tree(list, <<END)
class Test
@@static = 5
def foo
@field = "test"
localvar = 0
end
end
END
pgpJ648CpNeUY.pgp
Description: PGP signature
