@@ -118,6 +118,7 @@ func TestCompileOfProblematicSketches(t *testing.T) {
118
118
{"SketchWithFakeFunctionPointer" , testBuilderSketchWithFakeFunctionPointer },
119
119
{"SketchWithMinMaxDefinitions" , testBuilderSketchWithMinMaxDefinitions },
120
120
{"SketchWithFastledsLibrary" , testBuilderSketchWithFastledsLibrary },
121
+ {"SketchClassFunction" , testBuilderSketchClassFunction },
121
122
}.Run (t , env , cli )
122
123
}
123
124
@@ -776,6 +777,21 @@ func testBuilderSketchWithFastledsLibrary(t *testing.T, env *integrationtest.Env
776
777
})
777
778
}
778
779
780
+ func testBuilderSketchClassFunction (t * testing.T , env * integrationtest.Environment , cli * integrationtest.ArduinoCLI ) {
781
+ t .Run ("Build" , func (t * testing.T ) {
782
+ // Build
783
+ _ , err := tryBuild (t , env , cli , "arduino:avr:leonardo" )
784
+ require .NoError (t , err )
785
+ })
786
+
787
+ t .Run ("Preprocess" , func (t * testing.T ) {
788
+ // Preprocess
789
+ sketchPath , preprocessedSketch , err := tryPreprocess (t , env , cli , "arduino:avr:leonardo" )
790
+ require .NoError (t , err )
791
+ comparePreprocessGoldenFile (t , sketchPath , preprocessedSketch )
792
+ })
793
+ }
794
+
779
795
type builderOutput struct {
780
796
CompilerOut string `json:"compiler_out"`
781
797
CompilerErr string `json:"compiler_err"`
0 commit comments