Skip to content
/ tap Public

A tiny TAP (Test Anything Protocol) implementation for Go

License

Notifications You must be signed in to change notification settings

tinygo-org/tap

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

tap

A tiny TAP (Test Anything Protocol) implementation for Go

https://testanything.org/

Example

package main

import (
	"machine"
	"time"

	"tinygo.org/x/tap"
)

func main() {
	waitForStart()

	t := tap.New()
	t.Header(4)

	if digitalReadVoltageGPIO() {
		t.Pass("digitalReadVoltage (GPIO)")
	} else {
		t.Fail("digitalReadVoltage (GPIO)")
	}

	if digitalWriteGPIO() {
		t.Pass("digitalWrite (GPIO)")
	} else {
		t.Fail("digitalWrite (GPIO)")
	}

	if i2cConnection() {
		t.Pass("i2cConnection (MPU6050)")
	} else {
		t.Fail("i2cConnection (MPU6050)")
	}

	if spiTxRx() {
		t.Pass("spiTxRx")
	} else {
		t.Fail("spiTxRx")
	}

	endTests()
}

About

A tiny TAP (Test Anything Protocol) implementation for Go

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages