projects
/
ruby-eet.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Prefer rb_funcall2() over rb_funcall().
[ruby-eet.git]
/
test
/
test_basic.rb
diff --git
a/test/test_basic.rb
b/test/test_basic.rb
index 73a30bcf024d9c38e6b992577cddd98f223ded89..9c702c657a4a632c334e1505ede0485899dfd9c2 100644
(file)
--- a/
test/test_basic.rb
+++ b/
test/test_basic.rb
@@
-1,5
+1,3
@@
-# $Id: test_basic.rb 1 2005-03-26 01:45:38Z tilman $
-
require "eet"
require "test/unit"
require "common"
require "eet"
require "test/unit"
require "common"
@@
-11,8
+9,7
@@
class BasicTestData
@int = 1024
@long_long = (2 << 63) - 1
@flag = true
@int = 1024
@long_long = (2 << 63) - 1
@flag = true
- @float = 1234.0
- @double = 12341234.0
+ @float = 1234.12424213138
end
private
end
private
@@
-27,7
+24,7
@@
class BasicTestData
"i64" => [@long_long, :long_long],
"flag" => [@flag],
"f32" => [@float],
"i64" => [@long_long, :long_long],
"flag" => [@flag],
"f32" => [@float],
- "f64" => [@
double
, :double]}
+ "f64" => [@
float
, :double]}
end
end
end
end
@@
-54,8
+51,8
@@
class BasicTest < Test::Unit::TestCase
values = {"name" => "moo\0",
"i16" => "\0\2", "i32" => "\0\4\0\0",
"i64" => "\377" * 8, "flag" => "\1",
values = {"name" => "moo\0",
"i16" => "\0\2", "i32" => "\0\4\0\0",
"i64" => "\377" * 8, "flag" => "\1",
- "f32" => "
1234." + ("0" * 16) + "
\0",
- "f64" => "
12341234." + ("0" * 32) + "
\0"}
+ "f32" => "
0x1.3487f4p+10
\0",
+ "f64" => "
0x1.3487f39544c4p+10
\0"}
values.each do |k, v|
found = stream.find { |c| c.tag == k }
assert_not_nil(found, "chunk not found - #{k}")
values.each do |k, v|
found = stream.find { |c| c.tag == k }
assert_not_nil(found, "chunk not found - #{k}")