Sha256: 3096d04040be5247cc2604a4478ae5f9357fdb45696a12ed7d227967960ebb93

Contents?: true

Size: 843 Bytes

Versions: 1

Compression:

Stored size: 843 Bytes

Contents

#  _____         _
# |_   _|__  ___| |_
#   | |/ _ \/ __| __|
#   | |  __/\__ \ |_
#   |_|\___||___/\__|
#
# for lib/nano/string/soundex.rb
#
# Extracted Fri Oct 28 14:20:18 EDT 2005
# Unit Tools Reap Test Extractor
#

require 'nano/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-0.9.0 test/lib/nano/string/test_soundex.rb