Skip to content

[TS] Add and refactor ops #322

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 16 commits into from
Aug 13, 2025
Merged

[TS] Add and refactor ops #322

merged 16 commits into from
Aug 13, 2025

Conversation

Lipen
Copy link
Member

@Lipen Lipen commented Aug 6, 2025

This PR adds new operators and refactor existing ones.

@Lipen Lipen requested a review from Copilot August 6, 2025 15:04
Copy link

@Copilot 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 adds new TypeScript operators and refactors existing operator implementations to improve test structure and maintainability. The changes primarily focus on expanding operator coverage, improving naming consistency, and restructuring test organization.

Key changes include:

  • Addition of new operators: VoidOperator, UnaryPlus, NullishCoalescing, InOperator, DeleteOperator, and Bitwise operators
  • Refactoring of existing operator tests to use more consistent naming patterns and utility functions
  • Movement of Truthy and Strings classes from root samples to lang package
  • Introduction of utility functions for test comparisons and DSL method building

Reviewed Changes

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

Show a summary per file
File Description
VoidOperator.ts New operator test covering void operator behavior
UnaryPlus.ts New operator test for unary plus conversion
NullishCoalescing.ts New operator test for nullish coalescing (??)
InOperator.ts New operator test for 'in' operator
DeleteOperator.ts New operator test for delete operator
Bitwise.ts New operator tests for bitwise operations
Remainder.ts Refactored remainder operator tests with cleaner structure
Or.ts Simplified logical OR operator tests
Neg.ts Enhanced negation operator tests with additional cases
And.ts Comprehensive refactor with manual DSL method building
Equality.ts Expanded equality tests with new comparison cases
TypeOf.ts Moved and renamed from Strings to proper location
Less.ts Minor formatting and utility function updates
Util.kt New utility functions for number comparisons
TsMethodTestRunner.kt Enhanced test runner with better method resolution
Multiple test files Consistent adoption of new utility functions and naming patterns
Comments suppressed due to low confidence (1)

usvm-ts/src/test/kotlin/org/usvm/samples/operators/And.kt:144

  • [nitpick] This TODO comment appears multiple times in the file. Consider either implementing the missing falsy value handling or creating a more specific issue reference to track this work.
                        ret(const(5))

@Lipen Lipen changed the base branch from main to lipen/test-factory-dsl August 7, 2025 12:03
Base automatically changed from lipen/test-factory-dsl to main August 7, 2025 14:36
@Lipen
Copy link
Member Author

Lipen commented Aug 7, 2025

Rebased and fixed according to review comments.

@Lipen Lipen merged commit 6566cf1 into main Aug 13, 2025
6 checks passed
@Lipen Lipen deleted the lipen/ops branch August 13, 2025 11:16
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