@@ -22,9 +22,9 @@ import (
22
22
"testing"
23
23
24
24
bldr "github.com/arduino/arduino-cli/arduino/builder"
25
+ "github.com/arduino/arduino-cli/arduino/builder/cpp"
25
26
"github.com/arduino/arduino-cli/legacy/builder"
26
27
"github.com/arduino/arduino-cli/legacy/builder/types"
27
- "github.com/arduino/arduino-cli/legacy/builder/utils"
28
28
paths "github.com/arduino/go-paths-helper"
29
29
"github.com/stretchr/testify/require"
30
30
)
@@ -33,7 +33,7 @@ func TestPrototypesAdderBridgeExample(t *testing.T) {
33
33
DownloadCoresAndToolsAndLibraries (t )
34
34
35
35
sketchLocation := paths .New ("downloaded_libraries" , "Bridge" , "examples" , "Bridge" , "Bridge.ino" )
36
- quotedSketchLocation := utils . QuoteCppPath (Abs (t , sketchLocation ))
36
+ quotedSketchLocation := cpp . QuoteString (Abs (t , sketchLocation ). String ( ))
37
37
38
38
ctx := & types.Context {
39
39
HardwareDirs : paths .NewPathList (filepath .Join (".." , "hardware" ), "downloaded_hardware" ),
@@ -321,7 +321,7 @@ func TestPrototypesAdderSketchWithConfig(t *testing.T) {
321
321
DownloadCoresAndToolsAndLibraries (t )
322
322
323
323
sketchLocation := paths .New ("sketch_with_config" , "sketch_with_config.ino" )
324
- quotedSketchLocation := utils . QuoteCppPath (Abs (t , sketchLocation ))
324
+ quotedSketchLocation := cpp . QuoteString (Abs (t , sketchLocation ). String ( ))
325
325
326
326
ctx := & types.Context {
327
327
HardwareDirs : paths .NewPathList (filepath .Join (".." , "hardware" ), "downloaded_hardware" ),
@@ -362,7 +362,7 @@ func TestPrototypesAdderSketchNoFunctionsTwoFiles(t *testing.T) {
362
362
DownloadCoresAndToolsAndLibraries (t )
363
363
364
364
sketchLocation := paths .New ("sketch_no_functions_two_files" , "sketch_no_functions_two_files.ino" )
365
- quotedSketchLocation := utils . QuoteCppPath (Abs (t , sketchLocation ))
365
+ quotedSketchLocation := cpp . QuoteString (Abs (t , sketchLocation ). String ( ))
366
366
367
367
ctx := & types.Context {
368
368
HardwareDirs : paths .NewPathList (filepath .Join (".." , "hardware" ), "downloaded_hardware" ),
@@ -413,7 +413,7 @@ func TestPrototypesAdderSketchNoFunctions(t *testing.T) {
413
413
defer buildPath .RemoveAll ()
414
414
415
415
sketchLocation := paths .New ("sketch_no_functions" , "sketch_no_functions.ino" )
416
- quotedSketchLocation := utils . QuoteCppPath (Abs (t , sketchLocation ))
416
+ quotedSketchLocation := cpp . QuoteString (Abs (t , sketchLocation ). String ( ))
417
417
var _err error
418
418
commands := []types.Command {
419
419
& builder.ContainerSetupHardwareToolsLibsSketchAndProps {},
@@ -438,7 +438,7 @@ func TestPrototypesAdderSketchWithDefaultArgs(t *testing.T) {
438
438
DownloadCoresAndToolsAndLibraries (t )
439
439
440
440
sketchLocation := paths .New ("sketch_with_default_args" , "sketch_with_default_args.ino" )
441
- quotedSketchLocation := utils . QuoteCppPath (Abs (t , sketchLocation ))
441
+ quotedSketchLocation := cpp . QuoteString (Abs (t , sketchLocation ). String ( ))
442
442
443
443
ctx := & types.Context {
444
444
HardwareDirs : paths .NewPathList (filepath .Join (".." , "hardware" ), "downloaded_hardware" ),
@@ -476,7 +476,7 @@ func TestPrototypesAdderSketchWithInlineFunction(t *testing.T) {
476
476
DownloadCoresAndToolsAndLibraries (t )
477
477
478
478
sketchLocation := paths .New ("sketch_with_inline_function" , "sketch_with_inline_function.ino" )
479
- quotedSketchLocation := utils . QuoteCppPath (Abs (t , sketchLocation ))
479
+ quotedSketchLocation := cpp . QuoteString (Abs (t , sketchLocation ). String ( ))
480
480
481
481
ctx := & types.Context {
482
482
HardwareDirs : paths .NewPathList (filepath .Join (".." , "hardware" ), "downloaded_hardware" ),
@@ -525,7 +525,7 @@ func TestPrototypesAdderSketchWithFunctionSignatureInsideIFDEF(t *testing.T) {
525
525
DownloadCoresAndToolsAndLibraries (t )
526
526
527
527
sketchLocation := paths .New ("sketch_with_function_signature_inside_ifdef" , "sketch_with_function_signature_inside_ifdef.ino" )
528
- quotedSketchLocation := utils . QuoteCppPath (Abs (t , sketchLocation ))
528
+ quotedSketchLocation := cpp . QuoteString (Abs (t , sketchLocation ). String ( ))
529
529
530
530
ctx := & types.Context {
531
531
HardwareDirs : paths .NewPathList (filepath .Join (".." , "hardware" ), "downloaded_hardware" ),
@@ -563,7 +563,7 @@ func TestPrototypesAdderSketchWithUSBCON(t *testing.T) {
563
563
DownloadCoresAndToolsAndLibraries (t )
564
564
565
565
sketchLocation := paths .New ("sketch_with_usbcon" , "sketch_with_usbcon.ino" )
566
- quotedSketchLocation := utils . QuoteCppPath (Abs (t , sketchLocation ))
566
+ quotedSketchLocation := cpp . QuoteString (Abs (t , sketchLocation ). String ( ))
567
567
568
568
ctx := & types.Context {
569
569
HardwareDirs : paths .NewPathList (filepath .Join (".." , "hardware" ), "downloaded_hardware" ),
@@ -601,7 +601,7 @@ func TestPrototypesAdderSketchWithTypename(t *testing.T) {
601
601
DownloadCoresAndToolsAndLibraries (t )
602
602
603
603
sketchLocation := paths .New ("sketch_with_typename" , "sketch_with_typename.ino" )
604
- quotedSketchLocation := utils . QuoteCppPath (Abs (t , sketchLocation ))
604
+ quotedSketchLocation := cpp . QuoteString (Abs (t , sketchLocation ). String ( ))
605
605
606
606
ctx := & types.Context {
607
607
HardwareDirs : paths .NewPathList (filepath .Join (".." , "hardware" ), "downloaded_hardware" ),
@@ -644,7 +644,7 @@ func TestPrototypesAdderSketchWithIfDef2(t *testing.T) {
644
644
DownloadCoresAndToolsAndLibraries (t )
645
645
646
646
sketchLocation := paths .New ("sketch_with_ifdef" , "sketch_with_ifdef.ino" )
647
- quotedSketchLocation := utils . QuoteCppPath (Abs (t , sketchLocation ))
647
+ quotedSketchLocation := cpp . QuoteString (Abs (t , sketchLocation ). String ( ))
648
648
649
649
ctx := & types.Context {
650
650
HardwareDirs : paths .NewPathList (filepath .Join (".." , "hardware" ), "downloaded_hardware" ),
@@ -685,7 +685,7 @@ func TestPrototypesAdderSketchWithIfDef2SAM(t *testing.T) {
685
685
DownloadCoresAndToolsAndLibraries (t )
686
686
687
687
sketchLocation := paths .New ("sketch_with_ifdef" , "sketch_with_ifdef.ino" )
688
- quotedSketchLocation := utils . QuoteCppPath (Abs (t , sketchLocation ))
688
+ quotedSketchLocation := cpp . QuoteString (Abs (t , sketchLocation ). String ( ))
689
689
690
690
ctx := & types.Context {
691
691
HardwareDirs : paths .NewPathList (filepath .Join (".." , "hardware" ), "downloaded_hardware" ),
@@ -726,7 +726,7 @@ func TestPrototypesAdderSketchWithConst(t *testing.T) {
726
726
DownloadCoresAndToolsAndLibraries (t )
727
727
728
728
sketchLocation := paths .New ("sketch_with_const" , "sketch_with_const.ino" )
729
- quotedSketchLocation := utils . QuoteCppPath (Abs (t , sketchLocation ))
729
+ quotedSketchLocation := cpp . QuoteString (Abs (t , sketchLocation ). String ( ))
730
730
731
731
ctx := & types.Context {
732
732
HardwareDirs : paths .NewPathList (filepath .Join (".." , "hardware" ), "downloaded_hardware" ),
@@ -796,7 +796,7 @@ func TestPrototypesAdderSketchWithDosEol(t *testing.T) {
796
796
func TestPrototypesAdderSketchWithSubstringFunctionMember (t * testing.T ) {
797
797
DownloadCoresAndToolsAndLibraries (t )
798
798
sketchLocation := paths .New ("sketch_with_class_and_method_substring" , "sketch_with_class_and_method_substring.ino" )
799
- quotedSketchLocation := utils . QuoteCppString (Abs (t , sketchLocation ).String ())
799
+ quotedSketchLocation := cpp . QuoteString (Abs (t , sketchLocation ).String ())
800
800
801
801
ctx := & types.Context {
802
802
HardwareDirs : paths .NewPathList (filepath .Join (".." , "hardware" ), "downloaded_hardware" ),
0 commit comments