@@ -495,7 +495,7 @@ func TestPrototypesAdderSketchNoFunctions(t *testing.T) {
495
495
require .Nil (t , context [constants .CTX_PROTOTYPE_SECTION ])
496
496
}
497
497
498
- func TestPrototypesAdderSketchWithDefaultArgs (t * testing.T ) {
498
+ func TestPrototypesAdderSketchComplexFunctions (t * testing.T ) {
499
499
DownloadCoresAndToolsAndLibraries (t )
500
500
501
501
context := make (map [string ]interface {})
@@ -506,7 +506,7 @@ func TestPrototypesAdderSketchWithDefaultArgs(t *testing.T) {
506
506
context [constants .CTX_HARDWARE_FOLDERS ] = []string {filepath .Join (".." , "hardware" ), "hardware" , "downloaded_hardware" }
507
507
context [constants .CTX_TOOLS_FOLDERS ] = []string {"downloaded_tools" }
508
508
context [constants .CTX_FQBN ] = "arduino:avr:leonardo"
509
- context [constants .CTX_SKETCH_LOCATION ] = filepath .Join ("sketch_with_default_args " , "sketch.ino" )
509
+ context [constants .CTX_SKETCH_LOCATION ] = filepath .Join ("sketch_with_complex_prototypes " , "sketch.ino" )
510
510
context [constants .CTX_BUILD_PROPERTIES_RUNTIME_IDE_VERSION ] = "10600"
511
511
context [constants .CTX_BUILT_IN_LIBRARIES_FOLDERS ] = []string {"downloaded_libraries" }
512
512
context [constants .CTX_OTHER_LIBRARIES_FOLDERS ] = []string {"libraries" }
@@ -533,48 +533,7 @@ func TestPrototypesAdderSketchWithDefaultArgs(t *testing.T) {
533
533
}
534
534
535
535
require .Equal (t , "#include <Arduino.h>\n #line 1\n " , context [constants .CTX_INCLUDE_SECTION ].(string ))
536
- require .Equal (t , "void setup();\n void loop();\n #line 1\n " , context [constants .CTX_PROTOTYPE_SECTION ].(string ))
537
- }
538
-
539
- func TestPrototypesAdderSketchWithInlineFunction (t * testing.T ) {
540
- DownloadCoresAndToolsAndLibraries (t )
541
-
542
- context := make (map [string ]interface {})
543
-
544
- buildPath := SetupBuildPath (t , context )
545
- defer os .RemoveAll (buildPath )
546
-
547
- context [constants .CTX_HARDWARE_FOLDERS ] = []string {filepath .Join (".." , "hardware" ), "hardware" , "downloaded_hardware" }
548
- context [constants .CTX_TOOLS_FOLDERS ] = []string {"downloaded_tools" }
549
- context [constants .CTX_FQBN ] = "arduino:avr:leonardo"
550
- context [constants .CTX_SKETCH_LOCATION ] = filepath .Join ("sketch_with_inline_function" , "sketch.ino" )
551
- context [constants .CTX_BUILD_PROPERTIES_RUNTIME_IDE_VERSION ] = "10600"
552
- context [constants .CTX_BUILT_IN_LIBRARIES_FOLDERS ] = []string {"downloaded_libraries" }
553
- context [constants .CTX_OTHER_LIBRARIES_FOLDERS ] = []string {"libraries" }
554
- context [constants .CTX_VERBOSE ] = false
555
-
556
- commands := []types.Command {
557
- & builder.SetupHumanLoggerIfMissing {},
558
-
559
- & builder.ContainerSetupHardwareToolsLibsSketchAndProps {},
560
-
561
- & builder.ContainerMergeCopySketchFiles {},
562
-
563
- & builder.ContainerFindIncludes {},
564
-
565
- & builder.PrintUsedLibrariesIfVerbose {},
566
- & builder.WarnAboutArchIncompatibleLibraries {},
567
-
568
- & builder.ContainerAddPrototypes {},
569
- }
570
-
571
- for _ , command := range commands {
572
- err := command .Run (context )
573
- NoError (t , err )
574
- }
575
-
576
- require .Equal (t , "#include <Arduino.h>\n #line 1\n " , context [constants .CTX_INCLUDE_SECTION ].(string ))
577
- require .Equal (t , "void setup();\n void loop();\n short unsigned int testInt();\n #line 1\n " , context [constants .CTX_PROTOTYPE_SECTION ].(string ))
536
+ require .Equal (t , "void setup();\n void loop();\n short unsigned int testSimple();\n #line 1\n " , context [constants .CTX_PROTOTYPE_SECTION ].(string ))
578
537
}
579
538
580
539
func TestPrototypesAdderSketchWithFunctionSignatureInsideIFDEF (t * testing.T ) {
0 commit comments