Skip to content

Commit

Permalink
Added test for c++ static_assert
Browse files Browse the repository at this point in the history
see #68

Signed-off-by: Cristian Maglie <c.maglie@arduino.cc>
  • Loading branch information
cmaglie committed Jan 20, 2016
1 parent 9d3dc9e commit f18e7dd
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
// https://github.com/arduino/arduino-builder/issues/68

const int a = 10;
const int b = 20;

static_assert(a < b, "bar");

void setup() {
test();
}

void loop() {
}

void test() {
}
Original file line number Diff line number Diff line change
Expand Up @@ -177,6 +177,10 @@ func TestTryBuild033(t *testing.T) {
tryBuild(t, "sketch_that_includes_arduino_h", "sketch_that_includes_arduino_h.ino")
}

func TestTryBuild034(t *testing.T) {
tryBuild(t, "sketch_with_static_asserts", "sketch_with_static_asserts.ino")
}

func makeDefaultContext(t *testing.T) map[string]interface{} {
DownloadCoresAndToolsAndLibraries(t)

Expand Down

0 comments on commit f18e7dd

Please sign in to comment.