summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorakr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-08-30 14:39:21 +0000
committerakr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-08-30 14:39:21 +0000
commit8eb12fc30e7faf824d708d0068f0f6605b76abdc (patch)
treea787714a7ba2773b61af01bb4cb5efe0c7465f6c
parent74f9ec7e4f4a28da4cc57b14a2ee98e950ed91db (diff)
* ext/dl/test/test_import.rb: fix character code.
* ext/dl/test/test_func.rb: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18955 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r--ChangeLog6
-rw-r--r--ext/dl/test/test_func.rb6
-rw-r--r--ext/dl/test/test_import.rb12
3 files changed, 15 insertions, 9 deletions
diff --git a/ChangeLog b/ChangeLog
index 8077531bde..b75638dfb0 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+Sat Aug 30 23:38:00 2008 Tanaka Akira <akr@fsij.org>
+
+ * ext/dl/test/test_import.rb: fix character code.
+
+ * ext/dl/test/test_func.rb: ditto.
+
Sat Aug 30 22:23:31 2008 Tadayoshi Funaba <tadf@dotrb.org>
* rational.c: added a static variable for nurat_to_f.
diff --git a/ext/dl/test/test_func.rb b/ext/dl/test/test_func.rb
index 64a32d9565..887d38df95 100644
--- a/ext/dl/test/test_func.rb
+++ b/ext/dl/test/test_func.rb
@@ -15,9 +15,9 @@ module DL
def test_isdigit()
f = Function.new(CFunc.new(@libc['isdigit'], TYPE_INT, 'isdigit'),
[TYPE_INT])
- r1 = f.call(?1)
- r2 = f.call(?2)
- rr = f.call(?r)
+ r1 = f.call(?1.ord)
+ r2 = f.call(?2.ord)
+ rr = f.call(?r.ord)
assert_positive(r1)
assert_positive(r2)
assert_zero(rr)
diff --git a/ext/dl/test/test_import.rb b/ext/dl/test/test_import.rb
index f0694637eb..90f21dc65d 100644
--- a/ext/dl/test/test_import.rb
+++ b/ext/dl/test/test_import.rb
@@ -95,11 +95,11 @@ module DL
def test_struct()
s = LIBC::MyStruct.malloc()
s.num = [0,1,2,3,4]
- s.c = ?a
+ s.c = ?a.ord
s.buff = "012345\377"
assert_equal([0,1,2,3,4], s.num)
- assert_equal(?a, s.c)
- assert_equal([?0,?1,?2,?3,?4,?5,?\377], s.buff)
+ assert_equal(?a.ord, s.c)
+ assert_equal([?0.ord,?1.ord,?2.ord,?3.ord,?4.ord,?5.ord,?\377.ord], s.buff)
end
def test_gettimeofday()
@@ -120,9 +120,9 @@ module DL
end
def test_isdigit()
- r1 = LIBC.isdigit(?1)
- r2 = LIBC.isdigit(?2)
- rr = LIBC.isdigit(?r)
+ r1 = LIBC.isdigit(?1.ord)
+ r2 = LIBC.isdigit(?2.ord)
+ rr = LIBC.isdigit(?r.ord)
assert_positive(r1)
assert_positive(r2)
assert_zero(rr)