-
Notifications
You must be signed in to change notification settings - Fork 25
[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
Conversation
usvm-ts/src/main/kotlin/org/usvm/machine/interpreter/TsInterpreter.kt
Dismissed
Show dismissed
Hide dismissed
There was a problem hiding this 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))
usvm-ts/src/main/kotlin/org/usvm/machine/expr/TsExprResolver.kt
Outdated
Show resolved
Hide resolved
usvm-ts/src/main/kotlin/org/usvm/machine/expr/TsExprResolver.kt
Outdated
Show resolved
Hide resolved
usvm-ts/src/main/kotlin/org/usvm/machine/expr/TsExprResolver.kt
Outdated
Show resolved
Hide resolved
Rebased and fixed according to review comments. |
This PR adds new operators and refactor existing ones.