Commit 090a50b1 authored by Cristian Maglie's avatar Cristian Maglie

Moved custom hardware testdata into proper directory

parent 59436ca6
...@@ -26,13 +26,11 @@ import ( ...@@ -26,13 +26,11 @@ import (
"github.com/stretchr/testify/require" "github.com/stretchr/testify/require"
) )
var customHardware = paths.New("testdata", "custom_hardware")
func TestFindBoardWithFQBN(t *testing.T) { func TestFindBoardWithFQBN(t *testing.T) {
pm := packagemanager.NewPackageManager( pm := packagemanager.NewPackageManager(customHardware, customHardware, customHardware, customHardware)
paths.New("testdata"), pm.LoadHardwareFromDirectory(customHardware)
paths.New("testdata"),
paths.New("testdata"),
paths.New("testdata"))
pm.LoadHardwareFromDirectory(paths.New("testdata"))
board, err := pm.FindBoardWithFQBN("arduino:avr:uno") board, err := pm.FindBoardWithFQBN("arduino:avr:uno")
require.Nil(t, err) require.Nil(t, err)
...@@ -46,12 +44,8 @@ func TestFindBoardWithFQBN(t *testing.T) { ...@@ -46,12 +44,8 @@ func TestFindBoardWithFQBN(t *testing.T) {
} }
func TestBoardOptionsFunctions(t *testing.T) { func TestBoardOptionsFunctions(t *testing.T) {
pm := packagemanager.NewPackageManager( pm := packagemanager.NewPackageManager(customHardware, customHardware, customHardware, customHardware)
paths.New("testdata"), pm.LoadHardwareFromDirectory(customHardware)
paths.New("testdata"),
paths.New("testdata"),
paths.New("testdata"))
pm.LoadHardwareFromDirectory(paths.New("testdata"))
nano, err := pm.FindBoardWithFQBN("arduino:avr:nano") nano, err := pm.FindBoardWithFQBN("arduino:avr:nano")
require.Nil(t, err) require.Nil(t, err)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment