File tree Expand file tree Collapse file tree 1 file changed +25
-0
lines changed Expand file tree Collapse file tree 1 file changed +25
-0
lines changed Original file line number Diff line number Diff line change
1
+ # Copyright (c) 2019 Oracle and/or its affiliates. All rights reserved. This
2
+ # code is released under a tri EPL/GPL/LGPL license. You can use it,
3
+ # redistribute it and/or modify it under the terms of the:
4
+ #
5
+ # Eclipse Public License version 1.0, or
6
+ # GNU General Public License version 2, or
7
+ # GNU Lesser General Public License version 2.1.
8
+
9
+ require_relative '../../ruby/spec_helper'
10
+
11
+ guard -> { Truffle ::Interop . polyglot_access? } do
12
+ describe "Truffle::Interop.import" do
13
+
14
+ it "imports an object" do
15
+ object = Object . new
16
+ Truffle ::Interop . export :imports_an_object , object
17
+ Truffle ::Interop . import ( :imports_an_object ) . should == object
18
+ end
19
+
20
+ it "returns nil because Truffle::Interop.lookup_symbol returns nil if not found" do
21
+ Truffle ::Interop . import ( :not_registered_export_test ) . should == nil
22
+ end
23
+
24
+ end
25
+ end
You can’t perform that action at this time.
0 commit comments