Sha256: 1b6d03797f50004d57ea34fbb53a810dbf31c0ad44f483c392cf86154146217c

Contents?: true

Size: 857 Bytes

Versions: 1

Compression:

Stored size: 857 Bytes

Contents

#  _____         _
# |_   _|__  ___| |_
#   | |/ _ \/ __| __|
#   | |  __/\__ \ |_
#   |_|\___||___/\__|
#
# for lib/facets/core/string/soundex.rb
#
# Extracted Wed Aug 23 18:22:52 EDT 2006
# Unit Tools Reap Test Extractor
#

require 'facets/core/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.7.30 test/lib/facets/core/string/test_soundex.rb