httpexpect icon indicating copy to clipboard operation
httpexpect copied to clipboard

Support negative indexes in Array

Open gavv opened this issue 10 months ago • 3 comments

Support negative indexes in:

  • Array.Value
  • Array.HasValue
  • Array.NotHasValue

Semantics should be the same as in Python. This feature is useful when you want to check boundary values in the array beginning and end. It becomes especially useful with deprecation of First and Last methods.

Bound checks in corresponding methods should be updated. Currently we check and report AssertInRange with Min = 0, Max = len-1. Now it would be convenient to report this range only if index is >= 0, and to check and report Min = -len, Max = -1 range if index is negative.

Unit tests and documentation comments for all 3 methods should be updated as well.

gavv avatar Mar 04 '25 22:03 gavv

Hi, is this issue still available? I would like to work on it

ManojGadam avatar May 07 '25 05:05 ManojGadam

Hello is this issue still open? I would like to give it a shot.

jgfranco17 avatar Aug 17 '25 06:08 jgfranco17

is there any assigns left for this issue?

antriantsek avatar Sep 07 '25 12:09 antriantsek