]> git.donarmstrong.com Git - biopieces.git/commitdiff
removed stale unit tests from test_biopieces.rb
authormartinahansen <martinahansen@74ccb610-7750-0410-82ae-013aeee3265d>
Wed, 23 Nov 2011 13:50:50 +0000 (13:50 +0000)
committermartinahansen <martinahansen@74ccb610-7750-0410-82ae-013aeee3265d>
Wed, 23 Nov 2011 13:50:50 +0000 (13:50 +0000)
git-svn-id: http://biopieces.googlecode.com/svn/trunk@1681 74ccb610-7750-0410-82ae-013aeee3265d

code_ruby/test/maasha/test_biopieces.rb

index 1851c5cedfe30d53ea3f7f59885cd051b2dc7cd7..2dd2430b910eb500419c35ac9fffc24d420d2cd5 100755 (executable)
@@ -200,13 +200,6 @@ class BiopiecesTest < Test::Unit::TestCase
     assert_nothing_raised { Biopieces.options_parse(argv,[],SCRIPT_PATH) }
   end
 
-#  # FIXME This one fails because any argument to a flag is ignored and the flag value is set to true. Should it raise?
-#  test "Options.parse with type cast flag with and argument raises
-#    casts = [{:long=>"foo", :short=>"f", :type=>"flag", :mandatory=>false, :default=>nil, :allowed=>nil, :disallowed=>nil}]
-#    opt_parser = Options.new(casts)
-#    assert_raise(ArgumentError) { opt_parser.parse(["--foo", "bar"],SCRIPT_PATH) }
-#   end
-
   def test_Biopieces_options_parse_with_stream_in_argv_returns_correct_options
     argv = ["--stream_in", DUMMY_FILE]
     options = Biopieces.options_parse(argv,[],SCRIPT_PATH)
@@ -246,16 +239,6 @@ class BiopiecesTest < Test::Unit::TestCase
      assert_nothing_raised(ArgumentError) { Biopieces.options_parse(argv,casts,SCRIPT_PATH) }
    end
  
-#  # This one results in an error: "OptionParser::InvalidArgument: invalid argument: --foo bar"
-#  # So it appears that this is tested in OptionParser already.
-#  test "Options.parse with type cast int and non-int value raises" do
-#    ["bar" ].each do |val| # what about nil, false, true, [], {}, 0.1 ?
-#      casts = [{:long=>"foo", :short=>"f", :type=>"int", :mandatory=>false, :default=>nil, :allowed=>nil, :disallowed=>nil}]
-#      opt_parser = Options.new(casts)
-#      assert_raise(ArgumentError) { opt_parser.parse(["--foo", "#{val}"],SCRIPT_PATH) }
-#    end
-#  end
-
    def test_Biopieces_options_parse_with_type_cast_int_dont_raise
      [0,-1,1,327649123746293746374276347824].each do |val|
        argv  = ["--foo", "#{val}", "-I", DUMMY_FILE]
@@ -264,8 +247,6 @@ class BiopiecesTest < Test::Unit::TestCase
      end
    end
  
-   # TODO similar test for uint as "test "Options.parse with type cast int and non-int value raises" do"
    def test_Biopieces_options_parse_with_type_cast_uint_dont_raise
      [0,1,327649123746293746374276347824].each do |val|
        argv  = ["--foo", "#{val}", "-I", DUMMY_FILE]