[PR #1615] [MERGED] [FEATURE] Create unit test for rust code #2330

Open
opened 2026-01-29 17:21:31 +00:00 by claunia · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/CCExtractor/ccextractor/pull/1615
Author: @IshanGrover2004
Created: 6/1/2024
Status: Merged
Merged: 8/11/2024
Merged by: @PunitLodha

Base: masterHead: create-unit-testing


📝 Commits (10+)

  • 927a494 feat: Add new function to allocate any object to heap with zero allocated
  • c60bef9 feat: Add unit tests for decoder/commands.rs
  • ad4e75f docs: Mention about PR in changelogs
  • 91de924 feat: Add unit tests for decoder/windows.rs
  • 7f7fbd4 fix: Intialise tmp extern C values for easy mocking
  • 11309c6 feat: Add unit tests for decoder/timing.rs
  • 2fd23f8 feat: Add unit tests for decoder/output.rs
  • 05c1ddb feat: Add unit tests for decoder/mod.rs
  • 5374b37 feat: Add unit tests for decoder/tv_screen.rs
  • 01e9367 feat: Add unit tests for lib.rs

📊 Changes

19 files changed (+1690 additions, -51 deletions)

View changed files

📝 .github/workflows/format.yml (+8 -5)
📝 .github/workflows/test_rust.yml (+4 -0)
📝 docs/CHANGES.TXT (+1 -0)
📝 src/rust/lib_ccxr/src/time/units.rs (+164 -19)
📝 src/rust/lib_ccxr/src/util/bits.rs (+48 -2)
📝 src/rust/lib_ccxr/src/util/encoding.rs (+1 -2)
📝 src/rust/lib_ccxr/src/util/levenshtein.rs (+34 -0)
📝 src/rust/lib_ccxr/src/util/mod.rs (+17 -0)
📝 src/rust/src/decoder/commands.rs (+38 -0)
📝 src/rust/src/decoder/mod.rs (+96 -0)
📝 src/rust/src/decoder/output.rs (+34 -0)
📝 src/rust/src/decoder/service_decoder.rs (+548 -5)
📝 src/rust/src/decoder/timing.rs (+166 -0)
📝 src/rust/src/decoder/tv_screen.rs (+108 -0)
📝 src/rust/src/decoder/window.rs (+224 -18)
📝 src/rust/src/hardsubx/imgops.rs (+63 -0)
📝 src/rust/src/hardsubx/utility.rs (+52 -0)
📝 src/rust/src/lib.rs (+61 -0)
📝 src/rust/src/utils.rs (+23 -0)

📄 Description

In raising this pull request, I confirm the following (please check boxes):

  • I have read and understood the contributors guide.
  • I have checked that another pull request for this purpose does not exist.
  • I have considered, and confirmed that this submission will be valuable to others.
  • I accept that this submission may not be used, and the pull request closed at the will of the maintainer.
  • I give this submission freely, and claim no ownership to its content.
  • I have mentioned this change in the changelog.

My familiarity with the project is as follows (check one):

  • I have never used CCExtractor.
  • I have used CCExtractor just a couple of times.
  • I absolutely love CCExtractor, but have not contributed previously.
  • I am an active contributor to CCExtractor.

Creating Unit test cases for rust modules(decoder + hardsubx).
Closes #911


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/CCExtractor/ccextractor/pull/1615 **Author:** [@IshanGrover2004](https://github.com/IshanGrover2004) **Created:** 6/1/2024 **Status:** ✅ Merged **Merged:** 8/11/2024 **Merged by:** [@PunitLodha](https://github.com/PunitLodha) **Base:** `master` ← **Head:** `create-unit-testing` --- ### 📝 Commits (10+) - [`927a494`](https://github.com/CCExtractor/ccextractor/commit/927a4947a105c1425d0afaab5c8f2a931029c330) feat: Add new function to allocate any object to heap with zero allocated - [`c60bef9`](https://github.com/CCExtractor/ccextractor/commit/c60bef9f73b055443494909ea075977545e4f259) feat: Add unit tests for `decoder/commands.rs` - [`ad4e75f`](https://github.com/CCExtractor/ccextractor/commit/ad4e75faea3d684c453c939eea3edd2837261e4c) docs: Mention about PR in changelogs - [`91de924`](https://github.com/CCExtractor/ccextractor/commit/91de92496a99be96245e77fdbf93858f6791ab0c) feat: Add unit tests for `decoder/windows.rs` - [`7f7fbd4`](https://github.com/CCExtractor/ccextractor/commit/7f7fbd47aa848e6ed2bdc75ace1295c3cb05ef95) fix: Intialise tmp extern C values for easy mocking - [`11309c6`](https://github.com/CCExtractor/ccextractor/commit/11309c6cb77992a77245d03bf0668217290b8403) feat: Add unit tests for `decoder/timing.rs` - [`2fd23f8`](https://github.com/CCExtractor/ccextractor/commit/2fd23f8e63ff5f49c034419228fc4c9d2939ca24) feat: Add unit tests for `decoder/output.rs` - [`05c1ddb`](https://github.com/CCExtractor/ccextractor/commit/05c1ddbecbf09f87204910633e0584e1c0a361a3) feat: Add unit tests for `decoder/mod.rs` - [`5374b37`](https://github.com/CCExtractor/ccextractor/commit/5374b3792f762d4432a659c0fe18321028d26d7f) feat: Add unit tests for `decoder/tv_screen.rs` - [`01e9367`](https://github.com/CCExtractor/ccextractor/commit/01e93672907c9ebe5ce8b8a5dafcbeb19291cfc4) feat: Add unit tests for `lib.rs` ### 📊 Changes **19 files changed** (+1690 additions, -51 deletions) <details> <summary>View changed files</summary> 📝 `.github/workflows/format.yml` (+8 -5) 📝 `.github/workflows/test_rust.yml` (+4 -0) 📝 `docs/CHANGES.TXT` (+1 -0) 📝 `src/rust/lib_ccxr/src/time/units.rs` (+164 -19) 📝 `src/rust/lib_ccxr/src/util/bits.rs` (+48 -2) 📝 `src/rust/lib_ccxr/src/util/encoding.rs` (+1 -2) 📝 `src/rust/lib_ccxr/src/util/levenshtein.rs` (+34 -0) 📝 `src/rust/lib_ccxr/src/util/mod.rs` (+17 -0) 📝 `src/rust/src/decoder/commands.rs` (+38 -0) 📝 `src/rust/src/decoder/mod.rs` (+96 -0) 📝 `src/rust/src/decoder/output.rs` (+34 -0) 📝 `src/rust/src/decoder/service_decoder.rs` (+548 -5) 📝 `src/rust/src/decoder/timing.rs` (+166 -0) 📝 `src/rust/src/decoder/tv_screen.rs` (+108 -0) 📝 `src/rust/src/decoder/window.rs` (+224 -18) 📝 `src/rust/src/hardsubx/imgops.rs` (+63 -0) 📝 `src/rust/src/hardsubx/utility.rs` (+52 -0) 📝 `src/rust/src/lib.rs` (+61 -0) 📝 `src/rust/src/utils.rs` (+23 -0) </details> ### 📄 Description **In raising this pull request, I confirm the following (please check boxes):** - [x] I have read and understood the [contributors guide](https://github.com/CCExtractor/ccextractor/blob/master/.github/CONTRIBUTING.md). - [x] I have checked that another pull request for this purpose does not exist. - [x] I have considered, and confirmed that this submission will be valuable to others. - [x] I accept that this submission may not be used, and the pull request closed at the will of the maintainer. - [x] I give this submission freely, and claim no ownership to its content. - [x] **I have mentioned this change in the [changelog](https://github.com/CCExtractor/ccextractor/blob/master/docs/CHANGES.TXT).** **My familiarity with the project is as follows (check one):** - [ ] I have never used CCExtractor. - [ ] I have used CCExtractor just a couple of times. - [ ] I absolutely love CCExtractor, but have not contributed previously. - [x] I am an active contributor to CCExtractor. --- Creating Unit test cases for rust modules(`decoder` + `hardsubx`). Closes #911 --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
claunia added the pull-request label 2026-01-29 17:21:31 +00:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/ccextractor#2330