Skip to content

Split monolithic r2f tests into focused files - #43

Merged
t-kalinowski merged 5 commits into
float-divisionfrom
codex/split-large-test-file-into-smaller-organized-files
Aug 23, 2025
Merged

Split monolithic r2f tests into focused files#43
t-kalinowski merged 5 commits into
float-divisionfrom
codex/split-large-test-file-into-smaller-organized-files

Conversation

@t-kalinowski

Copy link
Copy Markdown
Owner

Summary

  • Break up the former test-r2f.R into logically grouped unit test files
  • Add example test files for real-world algorithms like Viterbi and heat diffusion
  • Extract and move related snapshot files alongside their new tests

Testing

  • R -q -e "testthat::test_local()"

https://chatgpt.com/codex/tasks/task_e_68a8f135592c8332a10e27ed0ef565a9

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

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 refactors the monolithic test-r2f.R file into focused, logically grouped unit test files to improve test organization and maintainability.

  • Splits the large test-r2f.R file into 15 specialized test files organized by functionality
  • Creates example test files demonstrating real-world algorithms (Viterbi, heat diffusion, convolution, rolling mean)
  • Moves related snapshot files alongside their new test files

Reviewed Changes

Copilot reviewed 30 out of 31 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
tests/testthat/test-r2f.R Removes original monolithic test file (1134 lines deleted)
tests/testthat/test-add.R Addition operations and basic function translation tests
tests/testthat/test-which.R Tests for which.max and which.min functions
tests/testthat/test-unary-intrinsics.R Tests for mathematical intrinsic functions (sin, cos, abs, etc.)
tests/testthat/test-size-constraint.R Tests for array size constraint validation
tests/testthat/test-seq.R Tests for sequence generation
tests/testthat/test-matrix.R Matrix creation and implicit size reuse tests
tests/testthat/test-loops.R Loop construct tests (repeat, while, for, break, next)
tests/testthat/test-logical.R Logical operations and comparisons
tests/testthat/test-ifelse.R Conditional ifelse operation tests
tests/testthat/test-hoist-mask.R Mask hoisting optimization tests
tests/testthat/test-div-mod.R Modulus and integer division operator tests
tests/testthat/test-declare-type.R Type declaration syntax variant tests
tests/testthat/test-example-*.R Real-world algorithm examples (Viterbi, heat diffusion, convolution, rolling mean)
tests/testthat/_snaps/*.md Snapshot files moved to match new test structure

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

Comment thread tests/testthat/test-loops.R Outdated
@t-kalinowski
t-kalinowski merged commit 1114d34 into float-division Aug 23, 2025
5 checks passed
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.

2 participants