Skip to content

Commit

Permalink
Update submodule content (#61)
Browse files Browse the repository at this point in the history
Co-authored-by: mkorbel1 <[email protected]>
  • Loading branch information
github-actions[bot] and mkorbel1 authored Jun 18, 2024
1 parent 8343b33 commit ebc1853
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 4 deletions.
16 changes: 13 additions & 3 deletions docs/_docs/A18-unit-testing.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,22 @@
title: "Unit Testing"
permalink: /docs/unit-test/
excerpt: "Unit Testing"
last_modified_at: 2022-12-06
last_modified_at: 2024-06-11
toc: true
---

Dart has a great unit testing package available on pub.dev: <https://pub.dev/packages/test>

The ROHD package has a great set of examples of how to write unit tests for ROHD `Module`s in the test/ directory.
The ROHD package has a great set of examples of how to write unit tests for ROHD `Module`s in the `test/` directory.

Note that when unit testing with ROHD, it is important to reset the `Simulator` with `Simulator.reset()`.
Note that when unit testing with ROHD, it is important to reset the `Simulator` with `Simulator.reset()` between tests. For example, you could include something like the following so that the `Simulator` is always reset at the end of each of your tests:

```dart
void main() {
tearDown(() async {
await Simulator.reset();
});
test('my first test', () async {
...
```

0 comments on commit ebc1853

Please sign in to comment.