Skip to content

Refactor tests and add unary/binary operations with error handling#13

Merged
FrozenLemonTee merged 8 commits intomainfrom
feat-add-more-operations
Mar 22, 2026
Merged

Refactor tests and add unary/binary operations with error handling#13
FrozenLemonTee merged 8 commits intomainfrom
feat-add-more-operations

Conversation

@FrozenLemonTee
Copy link
Member

No description provided.

….cpp for clarity

Signed-off-by: FrozenlemonTee <1115306170@qq.com>
…ations

Signed-off-by: FrozenlemonTee <1115306170@qq.com>
… bitwise operations, and unary operations

Signed-off-by: FrozenlemonTee <1115306170@qq.com>
…tions

Signed-off-by: FrozenlemonTee <1115306170@qq.com>
…signments and error reporting

Signed-off-by: FrozenlemonTee <1115306170@qq.com>
Copilot AI review requested due to automatic review settings March 22, 2026 09:28
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR expands the primitives operations framework to support additional unary and binary operators (with policy-based error handling) and adds/reshapes tests around underlying traits and operations dispatch.

Changes:

  • Added unary operations (++, --, unary +/-, ~) and additional binary/compound operators (%, <<, >>, &, |, ^) wired through the dispatcher.
  • Extended the value-policy invoker to implement checked/unchecked/saturating behavior for the new operations.
  • Added a new underlying/traits-focused test suite and extended operations tests for the new operators and error paths.

Reviewed changes

Copilot reviewed 4 out of 5 changed files in this pull request and generated 5 comments.

Show a summary per file
File Description
tests/basic/test_underlying.cpp New test suite for underlying traits, custom reps, and common-rep negotiation behavior.
tests/basic/test_operations.cpp Adds tests verifying unary/binary operator overloads and expected error reporting for modulus/shift.
src/operations/operators.cppm Adds public operations APIs and C++ operator overloads for new unary/binary/assignment operators.
src/operations/invoker.cppm Implements checked/unchecked/saturating runtime bindings for newly introduced operations.
src/operations/impl.cppm Defines new operation tags and their trait metadata (arity/capability).

FrozenLemonTee and others added 3 commits March 22, 2026 17:35
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
… compatibility

Signed-off-by: FrozenlemonTee <1115306170@qq.com>
… apply function

Signed-off-by: FrozenlemonTee <1115306170@qq.com>
@FrozenLemonTee FrozenLemonTee merged commit 7340b4f into main Mar 22, 2026
3 checks passed
@FrozenLemonTee FrozenLemonTee deleted the feat-add-more-operations branch March 22, 2026 10:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants