mirror of
https://github.com/tinygo-org/tinygo.git
synced 2026-08-07 20:43:40 +00:00
Add smoke tests for machine package
The machine package wasn't tested for every board. Therefore, add a new serial-like test that also tries to import the machine package. This should highlight potential issues in the future.
This commit is contained in:
committed by
Ron Evans
parent
385a7920e6
commit
e612f7cf3f
@@ -0,0 +1,17 @@
|
||||
package main
|
||||
|
||||
// This is the same as examples/serial, but it also imports the machine package.
|
||||
// It is used as a smoke test for the machine package (for boards that don't
|
||||
// have an on-board LED and therefore can't use examples/blinky1).
|
||||
|
||||
import (
|
||||
_ "machine" // smoke test for the machine package
|
||||
"time"
|
||||
)
|
||||
|
||||
func main() {
|
||||
for {
|
||||
println("hello world!")
|
||||
time.Sleep(time.Second)
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user