n.c.
[chise/ruby.git] / test / test-char.rb
index 5e36c4c..70dbdc0 100755 (executable)
@@ -28,6 +28,11 @@ class TestCharacter < Test::Unit::TestCase
     assert_raise(RuntimeError){ char.nosuchmethod(0) }
   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)
@@ -59,9 +64,11 @@ class TestCharacter < Test::Unit::TestCase
 
   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