forked from platformio/platformio-core
Update INO2CPP examples
This commit is contained in:
@ -1,21 +1,38 @@
|
|||||||
struct MyItem {
|
typedef struct Item item;
|
||||||
|
struct Item {
|
||||||
byte foo[50];
|
byte foo[50];
|
||||||
int bar;
|
int bar;
|
||||||
|
void (*noob)(item*);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
// test callback
|
||||||
|
class Foo {
|
||||||
|
|
||||||
|
public:
|
||||||
|
Foo(void (*function)()) {
|
||||||
|
#warning "Line number is 13"
|
||||||
|
}
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
Foo foo(&fooCallback);
|
||||||
|
|
||||||
|
//
|
||||||
|
|
||||||
void setup() {
|
void setup() {
|
||||||
struct MyItem item1;
|
struct Item item1;
|
||||||
myFunction(&item1);
|
myFunction(&item1);
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#warning "Line number is 13"
|
|
||||||
|
|
||||||
void loop() {
|
void loop() {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void myFunction(struct MyItem *item) {
|
void myFunction(struct Item *item) {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
void fooCallback(){
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
|
char buf[5];
|
||||||
|
|
||||||
void setup() {
|
void setup() {
|
||||||
barFunc();
|
|
||||||
fooFunc();
|
fooFunc();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -8,5 +9,5 @@ void loop() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
char* fooFunc() {
|
char* fooFunc() {
|
||||||
|
return buf;
|
||||||
}
|
}
|
@ -40,5 +40,5 @@ def test_warning_line(clirunner, validate_cliresult):
|
|||||||
result = clirunner.invoke(cmd_ci,
|
result = clirunner.invoke(cmd_ci,
|
||||||
[join(INOTEST_DIR, "basic"), "-b", "uno"])
|
[join(INOTEST_DIR, "basic"), "-b", "uno"])
|
||||||
validate_cliresult(result)
|
validate_cliresult(result)
|
||||||
assert ('basic.ino:13:2: warning: #warning "Line number is 13"' in
|
assert ('basic.ino:13:4: warning: #warning "Line number is 13"' in
|
||||||
result.output)
|
result.output)
|
||||||
|
Reference in New Issue
Block a user