Skip to content

tests: Add tests for vector#228

Merged
xmnlab merged 6 commits intoarxlang:mainfrom
yogendra-17:feature-vector
Mar 31, 2026
Merged

tests: Add tests for vector#228
xmnlab merged 6 commits intoarxlang:mainfrom
yogendra-17:feature-vector

Conversation

@yogendra-17
Copy link
Copy Markdown
Contributor

Notes

  • This repository uses an AI bot for reviews. Keep your PR in Draft while
    you work. When you’re ready for a review, change the status to Ready for
    review
    to trigger a new review round. If you make additional changes and
    don’t want to trigger the bot, switch the PR back to Draft.
  • AI-bot comments may not always be accurate. Please review them critically and
    share your feedback; it helps us improve the tool.
  • Avoid changing code that is unrelated to your proposal. Keep your PR as short
    as possible to increase the chances of a timely review. Large PRs may not be
    reviewed and may be closed.
  • Don’t add unnecessary comments. Your code should be readable and
    self-documenting
    (guidance).
  • Don’t change core features without prior discussion with the community. Use
    our Discord to discuss ideas, blockers, or issues
    (https://discord.gg/Nu4MdGj9jB).
  • Do not include secrets (API keys, tokens, passwords), credentials, or
    sensitive data/PII in code, configs, logs, screenshots, or commit history. If
    something leaks, rotate the credentials immediately, invalidate the old key,
    and note it in the PR so maintainers can assist.
  • Do not commit large binaries or generated artifacts. If large datasets are
    needed for tests, prefer small fixtures or programmatic downloads declared in
    makim.yaml (e.g., a task that fetches data at test time). If a large binary is
    unavoidable, discuss first and consider Git LFS.

Pull Request description

How to test these changes

  • ...

Pull Request checklists

This PR is a:

  • bug-fix
  • new feature
  • maintenance

About this PR:

  • it includes tests.
  • the tests are executed on CI.
  • the tests generate log file(s) (path).
  • pre-commit hooks were executed locally.
  • this PR requires a project documentation update.

Author's checklist:

  • I have reviewed the changes and it contains no misspelling.
  • The code is well commented, especially in the parts that contain more
    complexity.
  • New and old tests passed locally.

Additional information

Reviewer's checklist

Copy and paste this template for your review's note:

## Reviewer's Checklist

- [ ] I managed to reproduce the problem locally from the `main` branch
- [ ] I managed to test the new changes locally
- [ ] I confirm that the issues mentioned were fixed/resolved .

@yuvimittal yuvimittal marked this pull request as draft March 14, 2026 17:32
Comment thread tests/test_vector.py Outdated
@yogendra-17 yogendra-17 marked this pull request as ready for review March 23, 2026 09:58
@yuvimittal
Copy link
Copy Markdown
Member

@yogendra-17 , while the tests are strong , we need something like

`if isinstance(result, ir.Constant):
out_vals = list(result.constant)

if op == "+":
    expected = [l + r for l, r in zip(lhs_vals, rhs_vals)]
elif op == "-":
    expected = [l - r for l, r in zip(lhs_vals, rhs_vals)]
elif op == "*":
    expected = [l * r for l, r in zip(lhs_vals, rhs_vals)]
elif op == "/":
    if is_fp:
        expected = [l / r for l, r in zip(lhs_vals, rhs_vals)]
    else:
        # integer division (floor behavior depends on LLVM semantics)
        expected = [l // r for l, r in zip(lhs_vals, rhs_vals)]
else:
    raise AssertionError(f"Unhandled op {op}")

assert out_vals == expected, f"Expected {expected}, got {out_vals}"`

yogendra-17 and others added 6 commits March 31, 2026 17:34
# Conflicts:
#	tests/test_vector.py
…on ops

The comparison-op cases in test_unsupported_vector_op_raises used
match="" which accepts any exception, bypassing actual validation.
Replace with the expected r"Vector binop .* not implemented" pattern.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@xmnlab xmnlab changed the title feat: Add tests for vector tests: Add tests for vector Mar 31, 2026
@xmnlab
Copy link
Copy Markdown
Contributor

xmnlab commented Mar 31, 2026

thanks @yogendra-17

@xmnlab xmnlab merged commit 30f4c5e into arxlang:main Mar 31, 2026
13 of 14 checks passed
@github-actions
Copy link
Copy Markdown

github-actions bot commented Apr 2, 2026

🎉 This PR is included in version 1.9.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants