org.jruby.test
Class TestRubyHash

java.lang.Object
  extended byjunit.framework.Assert
      extended byjunit.framework.TestCase
          extended byorg.jruby.test.TestRubyBase
              extended byorg.jruby.test.TestRubyHash
All Implemented Interfaces:
junit.framework.Test

public class TestRubyHash
extends TestRubyBase

Version:
$Revision: 1.1 $
Author:
chadfowler

Field Summary
 
Fields inherited from class org.jruby.test.TestRubyBase
ruby
 
Constructor Summary
TestRubyHash(java.lang.String name)
           
 
Method Summary
 void setUp()
           
 void tearDown()
           
 void testConstructors()
          Test literal constructor {}, Hash::[], and Hash::new with and without the optional default-value argument.
 void testConversions()
          Hash#to_s, Hash#to_a, Hash#to_hash
 void testDefault()
          Hash#default, Hash#default=
 void testDeleting()
          Hash#delete, Hash#delete_if, Hash#reject, Hash#reject!
 void testIterating()
          Hash#each, Hash#each_pair, Hash#each_value, Hash#each_key
 void testLookups()
          Test Hash#[]= (store) and Hash#[] (retrieve).
 void testRestructuring()
          Hash#sort, Hash#invert
 void testSizeRelated()
          Hash#size, Hash#length, Hash#empty?
 
Methods inherited from class org.jruby.test.TestRubyBase
eval
 
Methods inherited from class junit.framework.TestCase
countTestCases, createResult, getName, run, run, runBare, runTest, setName, toString
 
Methods inherited from class junit.framework.Assert
assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertFalse, assertFalse, assertNotNull, assertNotNull, assertNotSame, assertNotSame, assertNull, assertNull, assertSame, assertSame, assertTrue, assertTrue, fail, fail
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

TestRubyHash

public TestRubyHash(java.lang.String name)
Method Detail

setUp

public void setUp()
           throws java.lang.Exception
Throws:
java.lang.Exception

tearDown

public void tearDown()
Overrides:
tearDown in class TestRubyBase

testConstructors

public void testConstructors()
                      throws java.lang.Exception
Test literal constructor {}, Hash::[], and Hash::new with and without the optional default-value argument.

Throws:
java.lang.Exception

testLookups

public void testLookups()
                 throws java.lang.Exception
Test Hash#[]= (store) and Hash#[] (retrieve). Also test whether Object#== is properly defined for each class.

Throws:
java.lang.Exception

testConversions

public void testConversions()
                     throws java.lang.Exception
Hash#to_s, Hash#to_a, Hash#to_hash

Throws:
java.lang.Exception

testSizeRelated

public void testSizeRelated()
                     throws java.lang.Exception
Hash#size, Hash#length, Hash#empty?

Throws:
java.lang.Exception

testIterating

public void testIterating()
                   throws java.lang.Exception
Hash#each, Hash#each_pair, Hash#each_value, Hash#each_key

Throws:
java.lang.Exception

testDeleting

public void testDeleting()
                  throws java.lang.Exception
Hash#delete, Hash#delete_if, Hash#reject, Hash#reject!

Throws:
java.lang.Exception

testDefault

public void testDefault()
                 throws java.lang.Exception
Hash#default, Hash#default=

Throws:
java.lang.Exception

testRestructuring

public void testRestructuring()
                       throws java.lang.Exception
Hash#sort, Hash#invert

Throws:
java.lang.Exception


Copyright © 2002 Jan Arne Petersen. All Rights Reserved.