Skip to content

Commit

Permalink
[Mono.Options] Fix messages in tests that changed after bf66c00
Browse files Browse the repository at this point in the history
  • Loading branch information
akoeplinger committed Mar 27, 2015
1 parent f048e17 commit a9230cc
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ public void Exceptions ()
c, v => { string ignore = v.OptionValues [0]; });
c.Option = p [0];
Utils.AssertException (typeof(ArgumentOutOfRangeException),
"Argument is out of range.\nParameter name: index",
"Specified argument was out of the range of valid values.\nParameter name: index",
c, v => { string ignore = v.OptionValues [2]; });
c.OptionName = "-a";
Utils.AssertException (typeof(OptionException),
Expand Down
8 changes: 4 additions & 4 deletions mcs/class/Mono.Options/Test/Mono.Options/OptionSetTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -354,10 +354,10 @@ public void Exceptions ()
p, v => { v.Parse (_("-a", "-b")); });
Assert.AreEqual (a, "-b");
Utils.AssertException (typeof(ArgumentNullException),
"Argument cannot be null.\nParameter name: option",
"Value cannot be null.\nParameter name: option",
p, v => { v.Add ((Option) null); });
Utils.AssertException (typeof(ArgumentNullException),
"Argument cannot be null.\nParameter name: header",
"Value cannot be null.\nParameter name: header",
p, v => { v.Add ((string) null); });

// bad type
Expand All @@ -374,7 +374,7 @@ public void Exceptions ()
p, v => { v.Parse (_("-cz", "extra")); });

Utils.AssertException (typeof(ArgumentNullException),
"Argument cannot be null.\nParameter name: action",
"Value cannot be null.\nParameter name: action",
p, v => { v.Add ("foo", (Action<string>) null); });
Utils.AssertException (typeof(ArgumentException),
"Cannot provide maxValueCount of 2 for OptionValueType.None.\nParameter name: maxValueCount",
Expand Down Expand Up @@ -752,7 +752,7 @@ public void DerivedType ()
Utils.AssertException (typeof(ArgumentException), "prototypes must be null!",
p, v => { v.Add ("N|NUM=", (int n) => {}); });
Utils.AssertException (typeof(ArgumentNullException),
"Argument cannot be null.\nParameter name: option",
"Value cannot be null.\nParameter name: option",
p, v => { v.GetOptionForName (null); });
}

Expand Down
4 changes: 2 additions & 2 deletions mcs/class/Mono.Options/Test/Mono.Options/OptionTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ public void Exceptions ()
{
object p = null;
Utils.AssertException (typeof(ArgumentNullException),
"Argument cannot be null.\nParameter name: prototype",
"Value cannot be null.\nParameter name: prototype",
p, v => { new DefaultOption (null, null); });
Utils.AssertException (typeof(ArgumentException),
"Cannot be the empty string.\nParameter name: prototype",
Expand All @@ -91,7 +91,7 @@ public void Exceptions ()
Utils.AssertException (null, null,
p, v => { new DefaultOption ("a|b=", null, 2); });
Utils.AssertException (typeof(ArgumentOutOfRangeException),
"Argument is out of range.\nParameter name: maxValueCount",
"Specified argument was out of the range of valid values.\nParameter name: maxValueCount",
p, v => { new DefaultOption ("a", null, -1); });
Utils.AssertException (typeof(ArgumentException),
"Cannot provide maxValueCount of 0 for OptionValueType.Required or " +
Expand Down

0 comments on commit a9230cc

Please sign in to comment.