@@ -31,12 +31,9 @@ package test
31
31
32
32
import (
33
33
"io/ioutil"
34
- "os"
35
34
"path/filepath"
36
35
"testing"
37
36
38
- "arduino.cc/builder"
39
- "arduino.cc/builder/constants"
40
37
"arduino.cc/builder/ctags"
41
38
"arduino.cc/builder/types"
42
39
"github.com/stretchr/testify/require"
@@ -214,45 +211,7 @@ func TestCTagsToPrototypesFunctionPointers(t *testing.T) {
214
211
}
215
212
216
213
func TestCTagsRunnerSketchWithClassFunction (t * testing.T ) {
217
- DownloadCoresAndToolsAndLibraries (t )
218
-
219
- sketchLocation := Abs (t , filepath .Join ("sketch_class_function" , "sketch_class_function.ino" ))
220
-
221
- ctx := & types.Context {
222
- HardwareFolders : []string {filepath .Join (".." , "hardware" ), "hardware" , "downloaded_hardware" },
223
- ToolsFolders : []string {"downloaded_tools" },
224
- BuiltInLibrariesFolders : []string {"downloaded_libraries" },
225
- OtherLibrariesFolders : []string {"libraries" },
226
- SketchLocation : sketchLocation ,
227
- FQBN : "arduino:avr:leonardo" ,
228
- ArduinoAPIVersion : "10600" ,
229
- Verbose : true ,
230
- }
231
-
232
- buildPath := SetupBuildPath (t , ctx )
233
- defer os .RemoveAll (buildPath )
234
-
235
- commands := []types.Command {
236
-
237
- & builder.ContainerSetupHardwareToolsLibsSketchAndProps {},
238
-
239
- & builder.ContainerMergeCopySketchFiles {},
240
-
241
- & builder.ContainerFindIncludes {},
242
-
243
- & builder.PrintUsedLibrariesIfVerbose {},
244
- & builder.WarnAboutArchIncompatibleLibraries {},
245
- & builder.CTagsTargetFileSaver {Source : & ctx .Source , TargetFileName : constants .FILE_CTAGS_TARGET },
246
- & ctags.CTagsRunner {},
247
- & ctags.CTags {},
248
- }
249
-
250
- for _ , command := range commands {
251
- err := command .Run (ctx )
252
- NoError (t , err )
253
- }
254
-
255
- prototypes := ctx .Prototypes
214
+ prototypes , _ := producePrototypes (t , "TestCTagsRunnerSketchWithClassFunction.txt" )
256
215
257
216
require .Equal (t , 3 , len (prototypes ))
258
217
require .Equal (t , "void setup();" , prototypes [0 ].Prototype )
0 commit comments