diff options
Diffstat (limited to 'starlark/testdata/builtins.star')
-rw-r--r-- | starlark/testdata/builtins.star | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/starlark/testdata/builtins.star b/starlark/testdata/builtins.star index 8dcee46..c6591b8 100644 --- a/starlark/testdata/builtins.star +++ b/starlark/testdata/builtins.star @@ -104,7 +104,8 @@ assert.eq(list(range(10)[1:11:2]), [1, 3, 5, 7, 9]) assert.eq(list(range(10)[::-2]), [9, 7, 5, 3, 1]) assert.eq(list(range(0, 10, 2)[::2]), [0, 4, 8]) assert.eq(list(range(0, 10, 2)[::-2]), [8, 4, 0]) -assert.fails(lambda: range(3000000000), "3000000000 out of range") # signed 32-bit values only +# range() is limited by the width of the Go int type (int32 or int64). +assert.fails(lambda: range(1<<64), "... out of range .want value in signed ..-bit range") assert.eq(len(range(0x7fffffff)), 0x7fffffff) # O(1) # Two ranges compare equal if they denote the same sequence: assert.eq(range(0), range(2, 1, 3)) # [] |