Skip to content

Commit

Permalink
Showing 2 changed files with 21 additions and 0 deletions.
20 changes: 20 additions & 0 deletions test/truffle/compiler/pe/core/interop_pe.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# Copyright (c) 2016 Oracle and/or its affiliates. All rights reserved. This
# code is released under a tri EPL/GPL/LGPL license. You can use it,
# redistribute it and/or modify it under the terms of the:
#
# Eclipse Public License version 1.0
# GNU General Public License version 2
# GNU Lesser General Public License version 2.1

module InteropPE
class A
attr_accessor :foo
def initialize(value)
@foo = value
end
end
end


example "Truffle::Interop.read(InteropPE::A.new(42), :@foo)", 42
example "Truffle::Interop.read(InteropPE::A.new(42), '@foo')", 42
1 change: 1 addition & 0 deletions test/truffle/compiler/pe/pe.rb
Original file line number Diff line number Diff line change
@@ -86,6 +86,7 @@ def counter(example)
require_relative 'core/block_given_pe.rb'
require_relative 'core/string_pe.rb'
require_relative 'core/class_pe'
require_relative 'core/interop_pe'
require_relative 'macro/pushing_pixels_pe.rb'

if Truffle::Interop.mime_type_supported?('application/javascript')

0 comments on commit d7ac8f5

Please sign in to comment.