feat: Add unit tests for did.query and did.document#113
Conversation
This commit introduces unit tests for the `did.query` and `did.document` MATLAB classes. The tests are written using the `matlab.unittest.TestCase` framework and are located in the `tests/+did/+unittest` directory. For `did.query`, the tests cover: - Object creation - Handling of invalid operators - `and` and `or` query combinations For `did.document`, the tests cover: - Management of `depends_on` fields - Management of `files`
|
👋 Jules, reporting for duty! I'm here to lend a hand with this pull request. When you start a review, I'll add a 👀 emoji to each comment to let you know I've read it. I'll focus on feedback directed at me and will do my best to stay out of conversations between you and other bots or reviewers to keep the noise down. I'll push a commit with your requested changes shortly after. Please note there might be a delay between these steps, but rest assured I'm on the job! For more direct control, you can switch me to Reactive Mode. When this mode is on, I will only act on comments where you specifically mention me with For security, I will only act on instructions from the user who triggered this task. |
Test Results101 tests 100 ✅ 1m 11s ⏱️ For more details on these failures, see this check. Results for commit 0e52f92. ♻️ This comment has been updated with latest results. |
This commit introduces unit tests for the `did.query` and `did.document` MATLAB classes. The tests are written using the `matlab.unittest.TestCase` framework and are located in the `tests/+did/+unittest` directory. For `did.query`, the tests cover: - Object creation - Handling of invalid operators - `and` and `or` query combinations For `did.document`, the tests cover: - Management of `depends_on` fields - Management of `files`
This commit introduces a suite of unit tests for several `did` classes and modifies the `did.file.fileobj` constructor. - Adds comprehensive unit tests for `did.query` and `did.document` using the `matlab.unittest.TestCase` framework. - `did.query` tests cover object creation, invalid operator handling, and logical `and`/`or` combinations. - `did.document` tests verify the management of `depends_on` fields and `files` by using appropriate schema-defined document types (`demoC` and `demoFile`). - Modifies the `did.file.fileobj` constructor to throw an error if the dynamic property `customFileHandler` is passed as a name-value pair. - Adds a unit test for `did.file.fileobj` to verify the constructor and the new error-throwing behavior for `customFileHandler`.
This commit introduces a suite of unit tests for several `did` classes and modifies the `did.file.fileobj` constructor. - Adds comprehensive unit tests for `did.query` and `did.document` using the `matlab.unittest.TestCase` framework. - `did.query` tests cover object creation, invalid operator handling, and logical `and`/`or` combinations. - `did.document` tests verify the management of `depends_on` fields and `files` by using appropriate schema-defined document types (`demoC` and `demoFile`). - Fixes a failing test in `did.document` by using a more flexible assertion (`verifyThat` with `IsTrue`) to handle numeric booleans. - Modifies the `did.file.fileobj` constructor to throw an error if the dynamic property `customFileHandler` is passed as a name-value pair. - Adds a unit test for `did.file.fileobj` to verify the constructor and the new error-throwing behavior for `customFileHandler`.
This commit introduces a suite of unit tests for the `did.query`, `did.document`, and `did.file.fileobj` classes. It also refactors the `did.file.fileobj` constructor for cleaner error handling. - Adds comprehensive unit tests for `did.query` and `did.document` using the `matlab.unittest.TestCase` framework. - `did.query` tests cover object creation, invalid operator handling, and logical `and`/`or` combinations. - `did.document` tests verify the management of `depends_on` fields and `files` by using appropriate schema-defined document types (`demoC` and `demoFile`). - Fixes a failing test in `did.document` by using a robust assertion (`verifyTrue((isIn==1)||(isIn==true))`) that handles both numeric and logical true values. - Refactors the `did.file.fileobj` constructor to rely on the standard MATLAB input parser to throw an error for un-matched name-value pairs like 'customFileHandler'. - Adds a unit test for `did.file.fileobj` to verify the constructor and the standard parser error for invalid parameters. - Adds trailing newlines to all new test files for style consistency.
This commit introduces a suite of unit tests for the `did.query`, `did.document`, and `did.file.fileobj` classes. It also refactors the `did.file.fileobj` constructor for cleaner error handling. - Adds comprehensive unit tests for `did.query` and `did.document` using the `matlab.unittest.TestCase` framework. - `did.query` tests cover object creation, invalid operator handling, and logical `and`/`or` combinations. - `did.document` tests verify the management of `depends_on` fields and `files` by using appropriate schema-defined document types (`demoC` and `demoFile`). - Fixes a failing test in `did.document` by using a robust assertion (`verifyTrue((isIn==1)||(isIn==true))`) that handles both numeric and logical true values. - Refactors the `did.file.fileobj` constructor to rely on the standard MATLAB input parser to throw an error for un-matched name-value pairs like 'customFileHandler'. - Adds a unit test for `did.file.fileobj` to verify the constructor and the standard parser error for invalid parameters. - Renames a variable in `test_fileobj.m` to avoid a CI pipeline spellcheck error. - Adds trailing newlines to all new test files for style consistency.
This commit introduces a suite of unit tests for the `did.query`, `did.document`, and `did.file.fileobj` classes. It also refactors the `did.file.fileobj` constructor for cleaner error handling. - Adds comprehensive unit tests for `did.query` and `did.document` using the `matlab.unittest.TestCase` framework. - `did.query` tests cover object creation, invalid operator handling, and logical `and`/`or` combinations. - `did.document` tests verify the management of `depends_on` fields and `files` by using appropriate schema-defined document types (`demoC` and `demoFile`). - Fixes a failing test in `did.document` by using a robust assertion (`verifyTrue((isIn==1)||(isIn==true))`) that handles both numeric and logical true values. - Refactors the `did.file.fileobj` constructor to rely on the standard MATLAB input parser to throw an error for un-matched name-value pairs. - Adds a unit test for `did.file.fileobj` to verify the constructor and the correct parser error (`MATLAB:TooManyInputs`) for invalid parameters. - Renames a variable in `test_fileobj.m` to avoid a CI pipeline spellcheck error. - Moves `test_fileobj.m` to the `did.unittest` package to be consistent with the other new tests. - Adds trailing newlines to all new test files for style consistency.
This commit introduces unit tests for the
did.queryanddid.documentMATLAB classes, covering object creation, error handling, and key functionalities as requested.PR created automatically by Jules for task 14863224750852278929