add unit tests (#60)

also, flatten the workspace into a single crate. I forget what the original reason for the workspace
was -- I think it was added because `cargo t -p testsuite` is nicer than running
`cargo t --test $filename` N times. However, a single crate removes the need to repeat the list of
dependencies in `testsuite/Cargo.toml`

also, document the two sets of tests included with the template and how to run them in the README
file
This commit is contained in:
Jorge Aparicio
2022-01-03 11:29:08 +01:00
committed by GitHub
parent d82fad8c96
commit 47277bbf9d
7 changed files with 72 additions and 55 deletions
+10 -2
View File
@@ -5,8 +5,13 @@ name = "{{project-name}}"
edition = "2018"
version = "0.1.0"
[workspace]
members = ["testsuite"]
[lib]
harness = false
# needed for each integration test
[[test]]
name = "integration"
harness = false
[dependencies]
cortex-m = "0.7.3"
@@ -17,6 +22,9 @@ panic-probe = { version = "0.3.0", features = ["print-defmt"] }
# TODO(4) enter your HAL here
# some-hal = "1.2.3"
[dev-dependencies]
defmt-test = "0.3.0"
# cargo build/run
[profile.dev]
codegen-units = 1