Skip to content

How run tests? #4609

@eleimt

Description

@eleimt

Hello!
I tried run simple test

func TestSimple(t *testing.T) {
	t.Errorf("error")
}

but get error

$ tinygo test -target=pico ./cmd/myproject
FAIL    myproject/cmd/myproject     0.000s
# myproject/internal/config
..\..\internal\config\config.go:34:22: undefined: machine.UART0_TX_PIN
..\..\internal\config\config.go:35:22: undefined: machine.UART0_RX_PIN
..\..\internal\config\config.go:40:22: undefined: machine.UART0_TX_PIN
..\..\internal\config\config.go:41:22: undefined: machine.UART0_RX_PIN

I have config.go file

func MustLoad() *Config {
	return &Config{
		Receiver: Uart{
			Uart:     machine.UART0,
			Tx:       machine.UART0_TX_PIN,
			Rx:       machine.UART0_RX_PIN,
			BaudRate: 115200,
		},
		// ...
	}
}

Help me please...

Metadata

Metadata

Assignees

No one assigned

    Labels

    info-neededWe need further information to help resolve

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions