assert_raise(RuntimeError){ char.nosuchmethod(0) }
end
+ def test_each
+ "字".each_feature {|f, v|
+ #qp f, v
+ assert_instance_of(String, f)
+ }
+
+ h = "字".hash_feature
+ assert_instance_of(Hash, h)
+ end
+
+ def test_bignum
+ char = CHISE::Character.get(1644203214)
+ assert_equal("\375\242\200\210\263\216", char.to_s)
+ end
+
def test_latin
char = "A".char
assert_equal(65, char.ascii)
end
def test_to_er
- #assert_equal("&J90-3B7A;", "字".char.to_er)
assert_equal("字", "字".char.to_er)
assert_equal("字", "&M-06942;".de_er.char.to_er)
assert_equal("𡙫", "&M-06000;".de_er.char.to_er)
def test_put
char = "字".char
- char["test_attribute"] = "test"
- assert_equal("test", char.test_attribute)
- char["test_attribute"] = "test2"
- assert_equal("test2", char.test_attribute)
+ #qp char.test_feature
+ char.test_feature = "test1"
+ assert_equal("test1", char.test_feature)
+ #qp char.test_feature
+ char.test_feature = "test2"
+ assert_equal("test2", char.test_feature)
end
end