summaryrefslogtreecommitdiff
path: root/test/-ext-
diff options
context:
space:
mode:
Diffstat (limited to 'test/-ext-')
-rw-r--r--test/-ext-/struct/test_member.rb12
1 files changed, 12 insertions, 0 deletions
diff --git a/test/-ext-/struct/test_member.rb b/test/-ext-/struct/test_member.rb
new file mode 100644
index 0000000..002941c
--- /dev/null
+++ b/test/-ext-/struct/test_member.rb
@@ -0,0 +1,12 @@
+require 'test/unit'
+require "-test-/struct"
+
+class Bug::Struct::Test_Member < Test::Unit::TestCase
+ S = Bug::Struct.new(:a)
+
+ def test_member_get
+ s = S.new(1)
+ assert_equal(1, s.get(:a))
+ assert_raise_with_message(NameError, /is not a struct member/) {s.get(:b)}
+ end
+end