Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

testing forward declaration conversion to ruby

  • Loading branch information...
commit 739fb9d65e83efebd4d0d109d36f7e5fc1ab4396 1 parent 7fb9fe1
@tenderlove authored
View
7 lib/zomg/idl/visitors/ruby_sexp.rb
@@ -134,9 +134,16 @@ def visit_SimpleDeclarator(o)
o.name.to_sym
end
+ def visit_ArrayDeclarator(o)
+ o.name.to_sym
+ end
+
def visit_Typedef(o)
end
+ def visit_ForwardDeclaration(o)
+ end
+
def accept(target)
target.accept(self)
end
View
22 test/conversions/test_forward_declaration.rb
@@ -0,0 +1,22 @@
+require 'helper'
+
+module ZOMG
+ module Conversions
+ class ForwardDeclarationTest < ZOMG::Test
+ def setup
+ @tree = ZOMG::IDL.parse(<<-eoidl)
+ interface A;
+ eoidl
+ end
+
+ # We don't bother with forward declarations in Ruby
+ def test_to_ruby_sexp
+ sexp = nil
+ assert_nothing_raised {
+ sexp = @tree.to_ruby_sexp
+ }
+ assert_equal([:block, nil], sexp)
+ end
+ end
+ end
+end
Please sign in to comment.
Something went wrong with that request. Please try again.