Move ino2cpp tests to the misc folder

This commit is contained in:
Ivan Kravets
2022-05-19 14:36:24 +03:00
parent 9da7c42be4
commit f4d9769450
9 changed files with 19 additions and 6 deletions
@@ -0,0 +1,60 @@
#define SQR(a) \
( a * a )
typedef struct Item item;
struct Item {
byte foo[50];
int bar;
void (*noob)(item*);
};
// test callback
class Foo {
public:
Foo(void (*function)()) {
#warning "Line number is 16"
}
bool childFunc() {
}
};
Foo foo(&fooCallback);
//
template<class T> T Add(T n1, T n2) {
return n1 + n2;
}
void setup() {
struct Item item1;
myFunction(&item1);
}
void loop() {
}
void myFunction(struct Item *item) {
}
#warning "Line number is 46"
void fooCallback(){
}
extern "C" {
void some_extern(const char *fmt, ...);
};
void some_extern(const char *fmt, ...) {
}
// юнікод
@@ -0,0 +1,4 @@
unsigned int barFunc () // my comment
{
return 0;
}
@@ -0,0 +1,13 @@
char buf[5];
void setup() {
fooFunc();
}
void loop() {
}
char* fooFunc() {
return buf;
}
@@ -0,0 +1,79 @@
const char headerEndP[] PROGMEM =
"<meta name='viewport' content='width=device-width, initial-scale=1'>\
<link rel='stylesheet' href='http://maxcdn.bootstrapcdn.com/bootstrap/3.3.4/css/bootstrap.min.css'>\
<script src='https://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js'></script>\
<script src='http://maxcdn.bootstrapcdn.com/bootstrap/3.3.4/js/bootstrap.min.js'></script></head>";
void setup() {
}
const char javaScriptPinControlP[] PROGMEM =
"<div id='content'></div>\
<div id='pin1'></div>\
<script>\
function show()\
{\
$.ajax({\
url: 'controlstatus',\
cache: false,\
success: function(html){\
$('#content').html(html);\
}\
});\
}\
function Pin1()\
{\
$.ajax({\
type: 'POST',\
url: 'control',\
data: '1=1',\
success: function(data){\
show();\
}\
});\
}\
function Auto1()\
{\
$.ajax({\
type: 'POST',\
url: 'control',\
data: '1=2',\
success: function(data){\
show();\
}\
});\
}\
function Pin2()\
{\
$.ajax({\
type: 'POST',\
url: 'control',\
data: '2=1',\
success: function(data){\
show();\
}\
});\
}\
function Auto2()\
{\
$.ajax({\
type: 'POST',\
url: 'control',\
data: '2=2',\
success: function(data){\
show();\
}\
});\
}\
$(document).ready(function(){\
show();\
setInterval('show()',5000);\
});\
</script>";
#warning "Line 75"
void loop() {
}