-
-
Notifications
You must be signed in to change notification settings - Fork 385
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ported SketchWithFastledsLibrary from legacy into integration test
- Loading branch information
1 parent
5a73abd
commit 54360c3
Showing
4 changed files
with
56 additions
and
53 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -63,6 +63,8 @@ func TestCompileOfProblematicSketches(t *testing.T) { | |
require.NoError(t, err) | ||
_, _, err = cli.Run("lib", "install", "[email protected]") | ||
require.NoError(t, err) | ||
_, _, err = cli.Run("lib", "install", "[email protected]") | ||
require.NoError(t, err) | ||
|
||
// Install custom hardware required for tests | ||
customHwDir, err := paths.New("..", "testdata", "user_hardware").Abs() | ||
|
@@ -114,6 +116,7 @@ func TestCompileOfProblematicSketches(t *testing.T) { | |
{"SketchWithMultilineTemplate", testBuilderSketchWithMultilineTemplate}, | ||
{"SketchWithFakeFunctionPointer", testBuilderSketchWithFakeFunctionPointer}, | ||
{"SketchWithMinMaxDefinitions", testBuilderSketchWithMinMaxDefinitions}, | ||
{"SketchWithFastledsLibrary", testBuilderSketchWithFastledsLibrary}, | ||
}.Run(t, env, cli) | ||
} | ||
|
||
|
@@ -757,6 +760,22 @@ func testBuilderSketchWithMinMaxDefinitions(t *testing.T, env *integrationtest.E | |
}) | ||
} | ||
|
||
func testBuilderSketchWithFastledsLibrary(t *testing.T, env *integrationtest.Environment, cli *integrationtest.ArduinoCLI) { | ||
t.Run("Build", func(t *testing.T) { | ||
// Build | ||
_, err := tryBuild(t, env, cli, "arduino:samd:arduino_zero_native") | ||
require.NoError(t, err) | ||
}) | ||
|
||
t.Run("Preprocess", func(t *testing.T) { | ||
// Preprocess | ||
sketchPath, preprocessedSketch, err := tryPreprocess(t, env, cli, "arduino:samd:arduino_zero_native") | ||
require.NoError(t, err) | ||
comparePreprocessGoldenFile(t, sketchPath, preprocessedSketch) | ||
}) | ||
} | ||
|
||
|
||
type builderOutput struct { | ||
CompilerOut string `json:"compiler_out"` | ||
CompilerErr string `json:"compiler_err"` | ||
|
File renamed without changes.
37 changes: 37 additions & 0 deletions
37
internal/integrationtest/compile_4/testdata/SketchFastleds/SketchFastleds.preprocessed.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
#include <Arduino.h> | ||
#line 1 {{QuoteCppString .sketchMainFile}} | ||
#include "FastLED.h" | ||
|
||
#define DATA_PIN 7 | ||
#define CLK_PIN 6 | ||
#define LED_TYPE APA102 | ||
#define COLOR_ORDER GRB | ||
#define NUM_LEDS 79 | ||
CRGB leds[NUM_LEDS]; | ||
|
||
#define BRIGHTNESS 96 | ||
#define FRAMES_PER_SECOND 120 | ||
#line 12 {{QuoteCppString .sketchMainFile}} | ||
void setup(); | ||
#line 17 {{QuoteCppString .sketchMainFile}} | ||
void loop(); | ||
#line 25 {{QuoteCppString .sketchMainFile}} | ||
void sinelon(); | ||
#line 12 {{QuoteCppString .sketchMainFile}} | ||
void setup() { | ||
|
||
FastLED.addLeds<LED_TYPE, DATA_PIN, CLK_PIN, COLOR_ORDER>(leds, NUM_LEDS).setCorrection(TypicalLEDStrip); | ||
} | ||
|
||
void loop() { | ||
|
||
} | ||
|
||
typedef void (*SimplePatternList[])(); | ||
//SimplePatternList gPatterns = { rainbow, rainbowWithGlitter, confetti, sinelon, juggle, bpm }; | ||
SimplePatternList gPatterns = {sinelon}; | ||
|
||
void sinelon() | ||
{ | ||
} | ||
|
53 changes: 0 additions & 53 deletions
53
legacy/builder/test/try_build_of_problematic_sketch_test.go
This file was deleted.
Oops, something went wrong.