[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Dotgnu-pnet-commits] CVS: pnetlib/runtime/System Array.cs,1.16,1.17
From: |
Rhys Weatherley <address@hidden> |
Subject: |
[Dotgnu-pnet-commits] CVS: pnetlib/runtime/System Array.cs,1.16,1.17 |
Date: |
Mon, 14 Apr 2003 00:49:13 -0400 |
Update of /cvsroot/dotgnu-pnet/pnetlib/runtime/System
In directory subversions:/tmp/cvs-serv26720/runtime/System
Modified Files:
Array.cs
Log Message:
Test cases and bug fixes for "Array.BinarySearch".
Index: Array.cs
===================================================================
RCS file: /cvsroot/dotgnu-pnet/pnetlib/runtime/System/Array.cs,v
retrieving revision 1.16
retrieving revision 1.17
diff -C2 -r1.16 -r1.17
*** Array.cs 16 Dec 2002 23:31:03 -0000 1.16
--- Array.cs 14 Apr 2003 04:49:11 -0000 1.17
***************
*** 2,6 ****
* Array.cs - Implementation of the "System.Array" class.
*
! * Copyright (C) 2001, 2002 Southern Storm Software, Pty Ltd.
*
* This program is free software; you can redistribute it and/or modify
--- 2,6 ----
* Array.cs - Implementation of the "System.Array" class.
*
! * Copyright (C) 2001, 2002, 2003 Southern Storm Software, Pty Ltd.
*
* This program is free software; you can redistribute it and/or modify
***************
*** 46,52 ****
left = lower;
right = upper;
! while(left <= right)
{
! middle = (left + right) / 2;
elem = array.GetValue(middle);
if(elem != null && value != null)
--- 46,58 ----
left = lower;
right = upper;
! if(right == Int32.MaxValue)
{
! // We cannot report the correct answer when "right" is
maxint
! // and the value is not found in the array.
! throw new ArgumentException(_("Arg_InvalidArrayRange"));
! }
! while((right - left) >= 0)
! {
! middle = left + ((right - left) / 2);
elem = array.GetValue(middle);
if(elem != null && value != null)
***************
*** 150,154 ****
("length", _("ArgRange_Array"));
}
! else if(index > array.GetUpperBound(0) ||
length > (array.GetUpperBound(0) - index + 1))
{
--- 156,160 ----
("length", _("ArgRange_Array"));
}
! else if((index - 1) > array.GetUpperBound(0) ||
length > (array.GetUpperBound(0) - index + 1))
{
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Dotgnu-pnet-commits] CVS: pnetlib/runtime/System Array.cs,1.16,1.17,
Rhys Weatherley <address@hidden> <=
- Prev by Date:
[Dotgnu-pnet-commits] CVS: pnetlib ChangeLog,1.831,1.832
- Next by Date:
[Dotgnu-pnet-commits] CVS: pnetlib/tests/runtime/System TestArray.cs,NONE,1.1 SuiteSystem.cs,1.4,1.5
- Previous by thread:
[Dotgnu-pnet-commits] CVS: pnetlib ChangeLog,1.831,1.832
- Next by thread:
[Dotgnu-pnet-commits] CVS: pnetlib/tests/runtime/System TestArray.cs,NONE,1.1 SuiteSystem.cs,1.4,1.5
- Index(es):