Sha256: 74416c21e30af2d84f13f9dedc5fd9d410c0264b3296aa5677ae65b927630cb5

Contents?: true

Size: 771 Bytes

Versions: 1

Compression:

Stored size: 771 Bytes

Contents

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

require 'facet/string/slap.rb'


  require 'test/unit'

  class TCString < Test::Unit::TestCase

    def setup
      @a =  ""
    end

    def test_001
      #assert_raises( ArgumentError ) { @a.slap }
      assert_raises( ArgumentError ) { @a.slap(1,2) }
    end

    def test_002
      assert_equal( "0", @a.slap("0") )
      assert_equal( "10", @a.slap("1") )
      assert_equal( "210", @a.slap("2") )
      assert_equal( "3210", @a.slap("3") )
      assert_equal( "43210", @a.slap("4") )
      assert_equal( "543210", @a.slap("5") )
    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_slap.rb