From 01691cb1db52ed2e9dda35002813a21de9dbd2ce Mon Sep 17 00:00:00 2001 From: danmosemsft Date: Thu, 15 Sep 2016 10:25:56 -0700 Subject: [PATCH 1/2] Fix Reverse_IndexLessThanLowerBound_ThrowsArgumentOutOfRangeException --- src/System.Runtime/tests/System/ArrayTests.cs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/System.Runtime/tests/System/ArrayTests.cs b/src/System.Runtime/tests/System/ArrayTests.cs index 3464b068154d..11ae2f9941fc 100644 --- a/src/System.Runtime/tests/System/ArrayTests.cs +++ b/src/System.Runtime/tests/System/ArrayTests.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. + // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. @@ -2182,7 +2182,8 @@ public static void Reverse_MultidimensionalArray_ThrowsRankException() [InlineData(1)] public static void Reverse_IndexLessThanLowerBound_ThrowsArgumentOutOfRangeException(int lowerBound) { - Assert.Throws("index", () => Array.Reverse(NonZeroLowerBoundArray(new int[0], lowerBound), lowerBound - 1, 0)); + var paramName = lowerBound <= 0 ? "index" : "length"; + Assert.Throws(paramName, () => Array.Reverse(NonZeroLowerBoundArray(new int[0], lowerBound), lowerBound - 1, 0)); } [Fact] From 9fb82cee7daeced5b95f48379a7ab8a326701bb9 Mon Sep 17 00:00:00 2001 From: danmosemsft Date: Thu, 15 Sep 2016 10:27:01 -0700 Subject: [PATCH 2/2] fix typo --- src/System.Runtime/tests/System/ArrayTests.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/System.Runtime/tests/System/ArrayTests.cs b/src/System.Runtime/tests/System/ArrayTests.cs index 11ae2f9941fc..1f7adcbd10fe 100644 --- a/src/System.Runtime/tests/System/ArrayTests.cs +++ b/src/System.Runtime/tests/System/ArrayTests.cs @@ -1,4 +1,4 @@ - // Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information.