@@ -34,7 +34,6 @@ import (
3434 "testing"
3535
3636 "github.com/arduino/arduino-builder"
37- "github.com/arduino/arduino-builder/constants"
3837 "github.com/arduino/arduino-builder/types"
3938 "github.com/arduino/arduino-cli/arduino/cores"
4039 "github.com/arduino/go-paths-helper"
@@ -53,6 +52,7 @@ func TestAddBuildBoardPropertyIfMissing(t *testing.T) {
5352 ctx := & types.Context {
5453 HardwareDirs : paths .NewPathList (filepath .Join (".." , "hardware" ), "hardware" , "downloaded_hardware" , "user_hardware" ),
5554 FQBN : parseFQBN (t , "my_avr_platform:avr:mymega" ),
55+ Verbose : true ,
5656 }
5757
5858 commands := []types.Command {
@@ -74,16 +74,17 @@ func TestAddBuildBoardPropertyIfMissing(t *testing.T) {
7474 require .Equal (t , "avr" , targetPlatform .Platform .Architecture )
7575 targetBoard := ctx .TargetBoard
7676 require .Equal (t , "mymega" , targetBoard .BoardID )
77- require .Equal (t , "" , targetBoard .Properties .Get (constants . BUILD_PROPERTIES_BUILD_MCU ))
78- require .Equal (t , "AVR_MYMEGA " , targetBoard .Properties .Get (constants . BUILD_PROPERTIES_BUILD_BOARD ))
77+ require .Equal (t , "atmega2560 " , targetBoard .Properties .Get ("build.mcu" ))
78+ require .Equal (t , "AVR_MYMEGA2560 " , targetBoard .Properties .Get ("build.board" ))
7979}
8080
8181func TestAddBuildBoardPropertyIfMissingNotMissing (t * testing.T ) {
8282 DownloadCoresAndToolsAndLibraries (t )
8383
8484 ctx := & types.Context {
8585 HardwareDirs : paths .NewPathList (filepath .Join (".." , "hardware" ), "hardware" , "downloaded_hardware" , "user_hardware" ),
86- FQBN : parseFQBN (t , "my_avr_platform:avr:mymega:cpu=atmega2560" ),
86+ FQBN : parseFQBN (t , "my_avr_platform:avr:mymega:cpu=atmega1280" ),
87+ Verbose : true ,
8788 }
8889
8990 commands := []types.Command {
@@ -103,6 +104,6 @@ func TestAddBuildBoardPropertyIfMissingNotMissing(t *testing.T) {
103104 require .Equal (t , "avr" , targetPlatform .Platform .Architecture )
104105 targetBoard := ctx .TargetBoard
105106 require .Equal (t , "mymega" , targetBoard .BoardID )
106- require .Equal (t , "atmega2560 " , targetBoard .Properties .Get (constants . BUILD_PROPERTIES_BUILD_MCU ))
107- require .Equal (t , "AVR_MEGA2560 " , targetBoard .Properties .Get (constants . BUILD_PROPERTIES_BUILD_BOARD ))
107+ require .Equal (t , "atmega1280 " , targetBoard .Properties .Get ("build.mcu" ))
108+ require .Equal (t , "AVR_MYMEGA " , targetBoard .Properties .Get ("build.board" ))
108109}
0 commit comments