Sha256: f3dbcc41eacb1f2c832a790e0cd8d076419056867fd5327c42f37ae31857e2c5

Contents?: true

Size: 845 Bytes

Versions: 1

Compression:

Stored size: 845 Bytes

Contents

#  _____         _
# |_   _|__  ___| |_
#   | |/ _ \/ __| __|
#   | |  __/\__ \ |_
#   |_|\___||___/\__|
#
# for lib/facet/string/soundex.rb
#
# Extracted Wed Jan 25 11:25:39 EST 2006
# Unit Tools Reap Test Extractor
#

require 'facet/string/soundex.rb'


  require 'test/unit'

  class TCString < Test::Unit::TestCase

    def test_soundex
      assert_equal("Ruby".soundex, "R100")
    end

  end

  class TC_Soundex < Test::Unit::TestCase

    TESTVEC = "Euler Ellery Gauss Ghosh Hilbert Heilbronn Knuth Kant Lloyd Ladd Lukasiewicz Lissajous".split(" ")
    RESVEC  = "E460 E460 G200 G200 H416 H416 K530 K530 L300 L300 L222 L222".split(" ")

    def test_soundex
      TESTVEC.each_with_index {|str,i| 
        res = str.soundex
        #print "#{str.ljust(11)} => #{res} ... "
        assert_equal( RESVEC[i], res )
      }
    end

  end


Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
facets-1.0.3 packages/core/test/lib/facet/string/test_soundex.rb