Skip to content

Commit

Permalink
Add test.
Browse files Browse the repository at this point in the history
  • Loading branch information
mneumann committed Mar 26, 2008
1 parent 5e4b1cf commit aab3805
Showing 1 changed file with 29 additions and 0 deletions.
29 changes: 29 additions & 0 deletions test/test_mixin.rb
@@ -0,0 +1,29 @@
require 'rubygems'
$LOAD_PATH.unshift '../lib'
require 'cplus2ruby'

module Mixin1; cplus2ruby
property :a, :int
end

class A; cplus2ruby
property :y, :int
end

class B < A; cplus2ruby
include Mixin1
end

class C < B; cplus2ruby
property :z, :int
end

Cplus2Ruby.commit('work/test_mixin', true)
t = B.new
t.y = 2
p t.y

t = C.new
t.z = 343333
p t.z
p t.y

0 comments on commit aab3805

Please sign in to comment.