From: Matt Armstrong Date: 2001-11-11T03:46:40+09:00 Subject: [ruby-talk:24839] Re: ANN: Triple-R - The Rubicon Results Repository Dave Thomas writes: > 2. Write new tests. Tests for 'language' are very welcome. Also, there > are problematic tests in the libraries that could do with tidying > up. In particular, if anyone can find a platform independent test > for Thread#abort_on_exception= I'd be grateful. In light of the recent thread about weird array behavior, I'd include these tests as well: Index: builtin/ArrayBase.rb =================================================================== RCS file: /src/rubicon/builtin/ArrayBase.rb,v retrieving revision 1.3 diff -u -r1.3 ArrayBase.rb --- builtin/ArrayBase.rb 2001/06/10 06:15:46 1.3 +++ builtin/ArrayBase.rb 2001/11/10 18:45:07 @@ -125,6 +125,10 @@ assert_equal(99, a[-2]) assert_equal(1, a[-100]) assert_nil(a[-101]) + assert_nil(a[-101,0]) + assert_nil(a[-101,1]) + assert_nil(a[-101,-1]) + assert_nil(a[10,-1]) assert_equal(@cls[1], a[0,1]) assert_equal(@cls[100], a[99,1]) @@ -132,6 +136,8 @@ assert_equal(@cls[100], a[99,100]) assert_equal(@cls[100], a[-1,1]) assert_equal(@cls[99], a[-2,1]) + assert_equal(@cls[], a[-100,0]) + assert_equal(@cls[1], a[-100,1]) assert_equal(@cls[10, 11, 12], a[9, 3]) assert_equal(@cls[10, 11, 12], a[-91, 3]) -- matt