Skip to content

Commit

Permalink
getting most of array to work
Browse files Browse the repository at this point in the history
  • Loading branch information
tenderlove committed Aug 6, 2008
1 parent 39db40a commit 5e7985d
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 0 deletions.
5 changes: 5 additions & 0 deletions test/array/test_array1.rb
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,11 @@ def setup
@tree = ZOMG::IDL::Parser.parse_file(array('array1.idl'))
end

def test_string_sequence
assert_sexp(
[:typedef, [:sequence, [[:scoped_name, "arr", []], [:int, 2]]], [[:decl, "arrseq"]]], @tree.duhr.Typedef[7])
end

def test_forward_declaration
assert_sexp([:forward_decl, 'foo'], @tree.duhr.ForwardDeclaration[0])
end
Expand Down
14 changes: 14 additions & 0 deletions test/array/test_array2.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
require 'helper'

class ArraysTest < ZOMG::Test
def setup
end

def test_to_sexp
['array2.idl', 'array3.idl', 'array4.idl'].each do |file|
assert_nothing_raised {
tree = ZOMG::IDL::Parser.parse_file(array(file)).to_sexp
}
end
end
end

0 comments on commit 5e7985d

Please sign in to comment.