diff options
| author | ttate <ttate@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2002-04-26 07:03:32 +0000 |
|---|---|---|
| committer | ttate <ttate@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2002-04-26 07:03:32 +0000 |
| commit | fa2a14bd29a7c36676c539dedcd80c669224ce09 (patch) | |
| tree | 1f1ae3c305f3d89d02c6caffd12fc0c275b8e5ef /ext/dl/test | |
| parent | 39ffe42db6871581f6e44951319e71434b99e4a3 (diff) | |
| download | ruby-fa2a14bd29a7c36676c539dedcd80c669224ce09.tar.gz ruby-fa2a14bd29a7c36676c539dedcd80c669224ce09.tar.xz ruby-fa2a14bd29a7c36676c539dedcd80c669224ce09.zip | |
ext/dl/ptr.c: missing break in switch statements.
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@2415 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ext/dl/test')
| -rw-r--r-- | ext/dl/test/test.rb | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/ext/dl/test/test.rb b/ext/dl/test/test.rb index cd63ff190..e6a7f3362 100644 --- a/ext/dl/test/test.rb +++ b/ext/dl/test/test.rb @@ -264,6 +264,7 @@ assert("data_aref", :must, ptr["name"].collect{|c| c.chr}.join.split("\0")[0] == "name2") assert("data_aref", :must, ptr["name"].collect{|c| c.chr}.join.split("\0")[0] == "name2") unless (Fixnum === :-) + ptr = ptr["next"] ptr.struct!("C1024P", :name, :next) assert("data_aref", :must, @@ -272,3 +273,17 @@ assert("data_aref", :must, ptr["name"].collect{|c| c.chr}.join.split("\0")[0] == "name1") unless (Fixnum === :-) GC.start + +ptr = DL::malloc(1024) +ptr.struct!("CHIL", "c", "h", "i", "l") +ptr["c"] = 1 +ptr["h"] = 2 +ptr["i"] = 3 +ptr["l"] = 4 +assert("struct!", :must, + ptr["c"] == 1 && + ptr["h"] == 2 && + ptr["i"] == 3 && + ptr["l"] == 4) + +GC.start |
