Sha256: 0a093be5ee6ed2b2177d60977bc79adcfbfa82fe23cc85f26d1d2456aabbdf4a

Contents?: true

Size: 920 Bytes

Versions: 1

Compression:

Stored size: 920 Bytes

Contents

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

require 'nano/string/pop.rb'


  require 'test/unit'

  class TCString < Test::Unit::TestCase

    def setup
      @a =  "012345"
    end

    def test_001
      assert_raises( ArgumentError ) { @a.pop(1) }
    end

    def test_002
      assert_equal( "5", @a.pop )
      assert_equal( "01234", @a )
      assert_equal( "4", @a.pop )
      assert_equal( "0123", @a )
      assert_equal( "3", @a.pop )
      assert_equal( "012", @a )
      assert_equal( "2", @a.pop )
      assert_equal( "01", @a )
      assert_equal( "1", @a.pop )
      assert_equal( "0", @a )
      assert_equal( "0", @a.pop )
      assert_equal( "", @a )
      assert_equal( "", @a.pop )
      assert_equal( "", @a )
    end

  end


Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
facets-0.9.0 test/lib/nano/string/test_pop.rb