@@ -55,11 +55,11 @@ func TestTargetBoardResolverUno(t *testing.T) {
5555 NoError (t , err )
5656 }
5757
58- targetPackage := context [ constants . CTX_TARGET_PACKAGE ].( * types. Package )
58+ targetPackage := ctx . TargetPackage
5959 require .Equal (t , "arduino" , targetPackage .PackageId )
60- targetPlatform := context [ constants . CTX_TARGET_PLATFORM ].( * types. Platform )
60+ targetPlatform := ctx . TargetPlatform
6161 require .Equal (t , "avr" , targetPlatform .PlatformId )
62- targetBoard := context [ constants . CTX_TARGET_BOARD ].( * types. Board )
62+ targetBoard := ctx . TargetBoard
6363 require .Equal (t , "uno" , targetBoard .BoardId )
6464 require .Equal (t , "atmega328p" , targetBoard .Properties [constants .BUILD_PROPERTIES_BUILD_MCU ])
6565}
@@ -81,11 +81,11 @@ func TestTargetBoardResolverDue(t *testing.T) {
8181 NoError (t , err )
8282 }
8383
84- targetPackage := context [ constants . CTX_TARGET_PACKAGE ].( * types. Package )
84+ targetPackage := ctx . TargetPackage
8585 require .Equal (t , "arduino" , targetPackage .PackageId )
86- targetPlatform := context [ constants . CTX_TARGET_PLATFORM ].( * types. Platform )
86+ targetPlatform := ctx . TargetPlatform
8787 require .Equal (t , "sam" , targetPlatform .PlatformId )
88- targetBoard := context [ constants . CTX_TARGET_BOARD ].( * types. Board )
88+ targetBoard := ctx . TargetBoard
8989 require .Equal (t , "arduino_due_x" , targetBoard .BoardId )
9090 require .Equal (t , "cortex-m3" , targetBoard .Properties [constants .BUILD_PROPERTIES_BUILD_MCU ])
9191}
@@ -107,11 +107,11 @@ func TestTargetBoardResolverMega1280(t *testing.T) {
107107 NoError (t , err )
108108 }
109109
110- targetPackage := context [ constants . CTX_TARGET_PACKAGE ].( * types. Package )
110+ targetPackage := ctx . TargetPackage
111111 require .Equal (t , "arduino" , targetPackage .PackageId )
112- targetPlatform := context [ constants . CTX_TARGET_PLATFORM ].( * types. Platform )
112+ targetPlatform := ctx . TargetPlatform
113113 require .Equal (t , "avr" , targetPlatform .PlatformId )
114- targetBoard := context [ constants . CTX_TARGET_BOARD ].( * types. Board )
114+ targetBoard := ctx . TargetBoard
115115 require .Equal (t , "mega" , targetBoard .BoardId )
116116 require .Equal (t , "atmega1280" , targetBoard .Properties [constants .BUILD_PROPERTIES_BUILD_MCU ])
117117 require .Equal (t , "AVR_MEGA" , targetBoard .Properties [constants .BUILD_PROPERTIES_BUILD_BOARD ])
@@ -134,11 +134,11 @@ func TestTargetBoardResolverMega2560(t *testing.T) {
134134 NoError (t , err )
135135 }
136136
137- targetPackage := context [ constants . CTX_TARGET_PACKAGE ].( * types. Package )
137+ targetPackage := ctx . TargetPackage
138138 require .Equal (t , "arduino" , targetPackage .PackageId )
139- targetPlatform := context [ constants . CTX_TARGET_PLATFORM ].( * types. Platform )
139+ targetPlatform := ctx . TargetPlatform
140140 require .Equal (t , "avr" , targetPlatform .PlatformId )
141- targetBoard := context [ constants . CTX_TARGET_BOARD ].( * types. Board )
141+ targetBoard := ctx . TargetBoard
142142 require .Equal (t , "mega" , targetBoard .BoardId )
143143 require .Equal (t , "atmega2560" , targetBoard .Properties [constants .BUILD_PROPERTIES_BUILD_MCU ])
144144 require .Equal (t , "AVR_MEGA2560" , targetBoard .Properties [constants .BUILD_PROPERTIES_BUILD_BOARD ])
@@ -161,11 +161,11 @@ func TestTargetBoardResolverCustomYun(t *testing.T) {
161161 NoError (t , err )
162162 }
163163
164- targetPackage := context [ constants . CTX_TARGET_PACKAGE ].( * types. Package )
164+ targetPackage := ctx . TargetPackage
165165 require .Equal (t , "my_avr_platform" , targetPackage .PackageId )
166- targetPlatform := context [ constants . CTX_TARGET_PLATFORM ].( * types. Platform )
166+ targetPlatform := ctx . TargetPlatform
167167 require .Equal (t , "avr" , targetPlatform .PlatformId )
168- targetBoard := context [ constants . CTX_TARGET_BOARD ].( * types. Board )
168+ targetBoard := ctx . TargetBoard
169169 require .Equal (t , "custom_yun" , targetBoard .BoardId )
170170 require .Equal (t , "atmega32u4" , targetBoard .Properties [constants .BUILD_PROPERTIES_BUILD_MCU ])
171171 require .Equal (t , "AVR_YUN" , targetBoard .Properties [constants .BUILD_PROPERTIES_BUILD_BOARD ])
@@ -188,11 +188,11 @@ func TestTargetBoardResolverCustomCore(t *testing.T) {
188188 NoError (t , err )
189189 }
190190
191- targetPackage := context [ constants . CTX_TARGET_PACKAGE ].( * types. Package )
191+ targetPackage := ctx . TargetPackage
192192 require .Equal (t , "watterott" , targetPackage .PackageId )
193- targetPlatform := context [ constants . CTX_TARGET_PLATFORM ].( * types. Platform )
193+ targetPlatform := ctx . TargetPlatform
194194 require .Equal (t , "avr" , targetPlatform .PlatformId )
195- targetBoard := context [ constants . CTX_TARGET_BOARD ].( * types. Board )
195+ targetBoard := ctx . TargetBoard
196196 require .Equal (t , "attiny841" , targetBoard .BoardId )
197197 require .Equal (t , "tiny841" , context [constants .CTX_BUILD_CORE ].(string ))
198198 require .Equal (t , "tiny14" , targetBoard .Properties [constants .BUILD_PROPERTIES_BUILD_VARIANT ])
0 commit comments