Skip to content

Refactors the implementation and the test#2

Merged
CGaaaaaa merged 3 commits intoCGaaaaaa:mainfrom
Asterless:refactor
Dec 4, 2025
Merged

Refactors the implementation and the test#2
CGaaaaaa merged 3 commits intoCGaaaaaa:mainfrom
Asterless:refactor

Conversation

@Asterless
Copy link
Copy Markdown
Contributor

This pull request refactors and modernizes both the implementation and the test suite of the reactive library, focusing on code style improvements and enhanced test assertions. The main changes include replacing manual increment/decrement operations with the += and -= operators, updating test assertions to use more idiomatic assertion functions, and improving output formatting for example and test code.

Operator Implementation Improvements

  • Replaced manual increment/decrement operations (e.g., count = count + 1) with compound assignment operators (count += 1, count -= 1) in all observable operators for consistency and clarity. (src/reactivex.mbt)

Test Suite Modernization

  • Updated all test assertions to use idiomatic assertion functions (assert_eq, assert_true, assert_false) instead of manual checks and panic(), improving readability and reliability of tests. (src/test.mbt)

Output Formatting Enhancements

  • Changed string interpolation to explicit concatenation and value conversion using value.to_string() in all example and test output, ensuring correct and consistent output formatting. (src/examples.mbt, src/test.mbt)

These changes collectively improve code readability, maintainability, and test reliability across the codebase.

@CGaaaaaa CGaaaaaa merged commit 404986d into CGaaaaaa:main Dec 4, 2025
1 check passed
@Asterless Asterless deleted the refactor branch December 4, 2025 16:57
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