@@ -34,7 +34,6 @@ import (
34
34
"testing"
35
35
36
36
"github.com/arduino/arduino-builder"
37
- "github.com/arduino/arduino-builder/constants"
38
37
"github.com/arduino/arduino-builder/types"
39
38
"github.com/arduino/arduino-cli/arduino/cores"
40
39
"github.com/arduino/go-paths-helper"
@@ -53,6 +52,7 @@ func TestAddBuildBoardPropertyIfMissing(t *testing.T) {
53
52
ctx := & types.Context {
54
53
HardwareDirs : paths .NewPathList (filepath .Join (".." , "hardware" ), "hardware" , "downloaded_hardware" , "user_hardware" ),
55
54
FQBN : parseFQBN (t , "my_avr_platform:avr:mymega" ),
55
+ Verbose : true ,
56
56
}
57
57
58
58
commands := []types.Command {
@@ -74,16 +74,17 @@ func TestAddBuildBoardPropertyIfMissing(t *testing.T) {
74
74
require .Equal (t , "avr" , targetPlatform .Platform .Architecture )
75
75
targetBoard := ctx .TargetBoard
76
76
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" ))
79
79
}
80
80
81
81
func TestAddBuildBoardPropertyIfMissingNotMissing (t * testing.T ) {
82
82
DownloadCoresAndToolsAndLibraries (t )
83
83
84
84
ctx := & types.Context {
85
85
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 ,
87
88
}
88
89
89
90
commands := []types.Command {
@@ -103,6 +104,6 @@ func TestAddBuildBoardPropertyIfMissingNotMissing(t *testing.T) {
103
104
require .Equal (t , "avr" , targetPlatform .Platform .Architecture )
104
105
targetBoard := ctx .TargetBoard
105
106
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" ))
108
109
}
0 commit comments