@@ -55,7 +55,7 @@ func TestLoadHardware(t *testing.T) {
55
55
NoError (t , err )
56
56
}
57
57
58
- packages := context [ constants . CTX_HARDWARE ].( * types. Packages )
58
+ packages := ctx . Hardware
59
59
require .Equal (t , 2 , len (packages .Packages ))
60
60
require .NotNil (t , packages .Packages ["arduino" ])
61
61
require .Equal (t , 2 , len (packages .Packages ["arduino" ].Platforms ))
@@ -103,7 +103,7 @@ func TestLoadHardwareMixingUserHardwareFolder(t *testing.T) {
103
103
NoError (t , err )
104
104
}
105
105
106
- packages := context [ constants . CTX_HARDWARE ].( * types. Packages )
106
+ packages := ctx . Hardware
107
107
108
108
if runtime .GOOS == "windows" {
109
109
//a package is a symlink, and windows does not support them
@@ -171,7 +171,7 @@ func TestLoadHardwareWithBoardManagerFolderStructure(t *testing.T) {
171
171
NoError (t , err )
172
172
}
173
173
174
- packages := context [ constants . CTX_HARDWARE ].( * types. Packages )
174
+ packages := ctx . Hardware
175
175
require .Equal (t , 3 , len (packages .Packages ))
176
176
require .NotNil (t , packages .Packages ["arduino" ])
177
177
require .Equal (t , 1 , len (packages .Packages ["arduino" ].Platforms ))
@@ -220,7 +220,7 @@ func TestLoadLotsOfHardware(t *testing.T) {
220
220
NoError (t , err )
221
221
}
222
222
223
- packages := context [ constants . CTX_HARDWARE ].( * types. Packages )
223
+ packages := ctx . Hardware
224
224
225
225
if runtime .GOOS == "windows" {
226
226
//a package is a symlink, and windows does not support them
0 commit comments