@@ -31,12 +31,9 @@ package test
3131
3232import (
3333 "io/ioutil"
34- "os"
3534 "path/filepath"
3635 "testing"
3736
38- "arduino.cc/builder"
39- "arduino.cc/builder/constants"
4037 "arduino.cc/builder/ctags"
4138 "arduino.cc/builder/types"
4239 "github.com/stretchr/testify/require"
@@ -214,45 +211,7 @@ func TestCTagsToPrototypesFunctionPointers(t *testing.T) {
214211}
215212
216213func 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" )
256215
257216 require .Equal (t , 3 , len (prototypes ))
258217 require .Equal (t , "void setup();" , prototypes [0 ].Prototype )
0 commit comments