Skip to content

Commit

Permalink
Minor wording improvement based on kevin's review feedback.
Browse files Browse the repository at this point in the history
  • Loading branch information
leihou6116 committed Oct 30, 2023
1 parent 2424a89 commit 400d27f
Showing 1 changed file with 5 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -42,11 +42,13 @@ To run the MATLAB interface tests on a local machine, start MATLAB and then `cd`
>> runtests(testFolderName, IncludeSubfolders = true) % For example: runtests('matlab\test', IncludeSubfolders = true)
```

To learn more about `runtests`, please check [the documentation of `runtests`](https://www.mathworks.com/help/matlab/ref/runtests.html).
To learn more about `runtests`, please check [the documentation](https://www.mathworks.com/help/matlab/ref/runtests.html).

## Writing Tests

All tests for the MATLAB interface should use the [MATLAB Class-Based Unit Testing Framework](https://www.mathworks.com/help/matlab/class-based-unit-tests.html) (i.e. they should use [`matlab.unittest.TestCase`](https://www.mathworks.com/help/matlab/ref/matlab.unittest.testcase-class.html)). Here is a simple example.
All tests for the MATLAB interface should use the [MATLAB Class-Based Unit Testing Framework](https://www.mathworks.com/help/matlab/class-based-unit-tests.html) (i.e. they should use [`matlab.unittest.TestCase`](https://www.mathworks.com/help/matlab/ref/matlab.unittest.testcase-class.html)).

Included below is a simple example of a MATLAB test:

```matlab
classdef tStringArray < matlab.unittest.TestCase
Expand Down Expand Up @@ -139,4 +141,4 @@ Below is an example of running all tests under `matlab/test` and getting the MAT

### Debugging Code Coverage Results

If the `runtests` command with `RepoCoverageFor` reports confusing or incorrect code coverage results, this could be due to caching or other issues. As a workaround, you can try setting a breakpoint in your source file, and then run the tests. This step can be used to verify that your source file is being executed by the tests.
If the `runtests` command with `RepoCoverageFor` reports confusing or incorrect code coverage results, this could be due to caching or other issues. As a workaround, you can try setting a breakpoint in your source file, and then re-run the tests. This step can be used to verify that your source file is being executed by the tests.

0 comments on commit 400d27f

Please sign in to comment.