Declare main() with argc/argv params in tests
Declaring the main method as "int main(void)" causes issues with SDL. Fixes #1209 <https://github.com/Genymobile/scrcpy/issues/1209>
This commit is contained in:
parent
322f1512ea
commit
199c74f62f
7 changed files with 28 additions and 7 deletions
|
@ -65,7 +65,10 @@ static void test_buffer_read64be(void) {
|
||||||
assert(val == 0xABCD1234567890EF);
|
assert(val == 0xABCD1234567890EF);
|
||||||
}
|
}
|
||||||
|
|
||||||
int main(void) {
|
int main(int argc, char *argv[]) {
|
||||||
|
(void) argc;
|
||||||
|
(void) argv;
|
||||||
|
|
||||||
test_buffer_write16be();
|
test_buffer_write16be();
|
||||||
test_buffer_write32be();
|
test_buffer_write32be();
|
||||||
test_buffer_write64be();
|
test_buffer_write64be();
|
||||||
|
|
|
@ -65,7 +65,10 @@ static void test_cbuf_push_take(void) {
|
||||||
assert(item == 35);
|
assert(item == 35);
|
||||||
}
|
}
|
||||||
|
|
||||||
int main(void) {
|
int main(int argc, char *argv[]) {
|
||||||
|
(void) argc;
|
||||||
|
(void) argv;
|
||||||
|
|
||||||
test_cbuf_empty();
|
test_cbuf_empty();
|
||||||
test_cbuf_full();
|
test_cbuf_full();
|
||||||
test_cbuf_push_take();
|
test_cbuf_push_take();
|
||||||
|
|
|
@ -122,7 +122,10 @@ static void test_options2(void) {
|
||||||
assert(opts->record_format == SC_RECORD_FORMAT_MP4);
|
assert(opts->record_format == SC_RECORD_FORMAT_MP4);
|
||||||
}
|
}
|
||||||
|
|
||||||
int main(void) {
|
int main(int argc, char *argv[]) {
|
||||||
|
(void) argc;
|
||||||
|
(void) argv;
|
||||||
|
|
||||||
test_flag_version();
|
test_flag_version();
|
||||||
test_flag_help();
|
test_flag_help();
|
||||||
test_options();
|
test_options();
|
||||||
|
|
|
@ -257,7 +257,10 @@ static void test_serialize_rotate_device(void) {
|
||||||
assert(!memcmp(buf, expected, sizeof(expected)));
|
assert(!memcmp(buf, expected, sizeof(expected)));
|
||||||
}
|
}
|
||||||
|
|
||||||
int main(void) {
|
int main(int argc, char *argv[]) {
|
||||||
|
(void) argc;
|
||||||
|
(void) argv;
|
||||||
|
|
||||||
test_serialize_inject_keycode();
|
test_serialize_inject_keycode();
|
||||||
test_serialize_inject_text();
|
test_serialize_inject_text();
|
||||||
test_serialize_inject_text_long();
|
test_serialize_inject_text_long();
|
||||||
|
|
|
@ -45,7 +45,10 @@ static void test_deserialize_clipboard_big(void) {
|
||||||
device_msg_destroy(&msg);
|
device_msg_destroy(&msg);
|
||||||
}
|
}
|
||||||
|
|
||||||
int main(void) {
|
int main(int argc, char *argv[]) {
|
||||||
|
(void) argc;
|
||||||
|
(void) argv;
|
||||||
|
|
||||||
test_deserialize_clipboard();
|
test_deserialize_clipboard();
|
||||||
test_deserialize_clipboard_big();
|
test_deserialize_clipboard_big();
|
||||||
return 0;
|
return 0;
|
||||||
|
|
|
@ -32,7 +32,10 @@ static void test_queue(void) {
|
||||||
assert(queue_is_empty(&queue));
|
assert(queue_is_empty(&queue));
|
||||||
}
|
}
|
||||||
|
|
||||||
int main(void) {
|
int main(int argc, char *argv[]) {
|
||||||
|
(void) argc;
|
||||||
|
(void) argv;
|
||||||
|
|
||||||
test_queue();
|
test_queue();
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
|
@ -286,7 +286,10 @@ static void test_parse_integer_with_suffix(void) {
|
||||||
assert(!ok);
|
assert(!ok);
|
||||||
}
|
}
|
||||||
|
|
||||||
int main(void) {
|
int main(int argc, char *argv[]) {
|
||||||
|
(void) argc;
|
||||||
|
(void) argv;
|
||||||
|
|
||||||
test_xstrncpy_simple();
|
test_xstrncpy_simple();
|
||||||
test_xstrncpy_just_fit();
|
test_xstrncpy_just_fit();
|
||||||
test_xstrncpy_truncated();
|
test_xstrncpy_truncated();
|
||||||
|
|
Loading…
Reference in a new issue