Skip to content

Commit

Permalink
try fix filecheck
Browse files Browse the repository at this point in the history
Signed-off-by: martinvuyk <[email protected]>
  • Loading branch information
martinvuyk committed Jan 2, 2025
1 parent c86dc14 commit a0d013b
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 6 deletions.
9 changes: 4 additions & 5 deletions stdlib/src/collections/_index_normalization.mojo
Original file line number Diff line number Diff line change
Expand Up @@ -90,14 +90,13 @@ fn normalize_index[
else:
return idx + normalize_len
else:
@parameter
if ignore_zero_length:
if c_len == 0:
return 0

@parameter
if clamp_to_container_length:
return min(c_len - 1, idx) if idx > -1 else max(0, idx + c_len)
else:

@parameter
if ignore_zero_length:
if c_len == 0:
return 0
return idx if idx > -1 else idx + c_len
2 changes: 1 addition & 1 deletion stdlib/test/collections/test_index_normalization.mojo
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.
# ===----------------------------------------------------------------------=== #
# RUN: %bare-mojo -D ASSERT=warn %s
# RUN: %bare-mojo -D ASSERT=warn %s | FileCheck %s

from collections._index_normalization import normalize_index

Expand Down

0 comments on commit a0d013b

Please sign in to comment.