diff --git a/tests/stress.rs b/tests/stress.rs index 0c4c18c16..50bb3e462 100644 --- a/tests/stress.rs +++ b/tests/stress.rs @@ -414,428 +414,6 @@ unsafe fn stress_functions(context: &dc_context_t) { free(fn1 as *mut libc::c_void); } - if 0 != !(strcmp( - b"fresh=10\x00" as *const u8 as *const libc::c_char, - b"fresh=10\x00" as *const u8 as *const libc::c_char, - ) == 0i32) as libc::c_int as libc::c_long - { - __assert_rtn( - (*::std::mem::transmute::<&[u8; 17], &[libc::c_char; 17]>(b"stress_functions\x00")) - .as_ptr(), - b"../cmdline/stress.c\x00" as *const u8 as *const libc::c_char, - 471i32, - b"strcmp(\"fresh=\" DC_STRINGIFY(DC_STATE_IN_FRESH), \"fresh=10\")==0\x00" as *const u8 - as *const libc::c_char, - ); - } else { - }; - if 0 != !(strcmp( - b"noticed=13\x00" as *const u8 as *const libc::c_char, - b"noticed=13\x00" as *const u8 as *const libc::c_char, - ) == 0i32) as libc::c_int as libc::c_long - { - __assert_rtn( - (*::std::mem::transmute::<&[u8; 17], &[libc::c_char; 17]>(b"stress_functions\x00")) - .as_ptr(), - b"../cmdline/stress.c\x00" as *const u8 as *const libc::c_char, - 472i32, - b"strcmp(\"noticed=\" DC_STRINGIFY(DC_STATE_IN_NOTICED), \"noticed=13\")==0\x00" - as *const u8 as *const libc::c_char, - ); - } else { - }; - if 0 != !(strcmp( - b"seen=16\x00" as *const u8 as *const libc::c_char, - b"seen=16\x00" as *const u8 as *const libc::c_char, - ) == 0i32) as libc::c_int as libc::c_long - { - __assert_rtn( - (*::std::mem::transmute::<&[u8; 17], &[libc::c_char; 17]>(b"stress_functions\x00")) - .as_ptr(), - b"../cmdline/stress.c\x00" as *const u8 as *const libc::c_char, - 473i32, - b"strcmp(\"seen=\" DC_STRINGIFY(DC_STATE_IN_SEEN), \"seen=16\")==0\x00" as *const u8 - as *const libc::c_char, - ); - } else { - }; - if 0 != !(strcmp( - b"pending=20\x00" as *const u8 as *const libc::c_char, - b"pending=20\x00" as *const u8 as *const libc::c_char, - ) == 0i32) as libc::c_int as libc::c_long - { - __assert_rtn( - (*::std::mem::transmute::<&[u8; 17], &[libc::c_char; 17]>(b"stress_functions\x00")) - .as_ptr(), - b"../cmdline/stress.c\x00" as *const u8 as *const libc::c_char, - 474i32, - b"strcmp(\"pending=\" DC_STRINGIFY(DC_STATE_OUT_PENDING), \"pending=20\")==0\x00" - as *const u8 as *const libc::c_char, - ); - } else { - }; - if 0 != !(strcmp( - b"failed=24\x00" as *const u8 as *const libc::c_char, - b"failed=24\x00" as *const u8 as *const libc::c_char, - ) == 0i32) as libc::c_int as libc::c_long - { - __assert_rtn( - (*::std::mem::transmute::<&[u8; 17], &[libc::c_char; 17]>(b"stress_functions\x00")) - .as_ptr(), - b"../cmdline/stress.c\x00" as *const u8 as *const libc::c_char, - 475i32, - b"strcmp(\"failed=\" DC_STRINGIFY(DC_STATE_OUT_FAILED), \"failed=24\")==0\x00" - as *const u8 as *const libc::c_char, - ); - } else { - }; - if 0 != !(strcmp( - b"delivered=26\x00" as *const u8 as *const libc::c_char, - b"delivered=26\x00" as *const u8 as *const libc::c_char, - ) == 0i32) as libc::c_int as libc::c_long - { - __assert_rtn( - (*::std::mem::transmute::<&[u8; 17], &[libc::c_char; 17]>(b"stress_functions\x00")) - .as_ptr(), - b"../cmdline/stress.c\x00" as *const u8 as *const libc::c_char, - 476i32, - b"strcmp(\"delivered=\" DC_STRINGIFY(DC_STATE_OUT_DELIVERED), \"delivered=26\")==0\x00" - as *const u8 as *const libc::c_char, - ); - } else { - }; - if 0 != !(strcmp( - b"mdn_rcvd=28\x00" as *const u8 as *const libc::c_char, - b"mdn_rcvd=28\x00" as *const u8 as *const libc::c_char, - ) == 0i32) as libc::c_int as libc::c_long - { - __assert_rtn( - (*::std::mem::transmute::<&[u8; 17], &[libc::c_char; 17]>(b"stress_functions\x00")) - .as_ptr(), - b"../cmdline/stress.c\x00" as *const u8 as *const libc::c_char, - 477i32, - b"strcmp(\"mdn_rcvd=\" DC_STRINGIFY(DC_STATE_OUT_MDN_RCVD), \"mdn_rcvd=28\")==0\x00" - as *const u8 as *const libc::c_char, - ); - } else { - }; - if 0 != !(strcmp( - b"undefined=0\x00" as *const u8 as *const libc::c_char, - b"undefined=0\x00" as *const u8 as *const libc::c_char, - ) == 0i32) as libc::c_int as libc::c_long - { - __assert_rtn( - (*::std::mem::transmute::<&[u8; 17], &[libc::c_char; 17]>(b"stress_functions\x00")) - .as_ptr(), - b"../cmdline/stress.c\x00" as *const u8 as *const libc::c_char, - 479i32, - b"strcmp(\"undefined=\" DC_STRINGIFY(DC_CHAT_TYPE_UNDEFINED), \"undefined=0\")==0\x00" - as *const u8 as *const libc::c_char, - ); - } else { - }; - if 0 != !(strcmp( - b"single=100\x00" as *const u8 as *const libc::c_char, - b"single=100\x00" as *const u8 as *const libc::c_char, - ) == 0i32) as libc::c_int as libc::c_long - { - __assert_rtn( - (*::std::mem::transmute::<&[u8; 17], &[libc::c_char; 17]>(b"stress_functions\x00")) - .as_ptr(), - b"../cmdline/stress.c\x00" as *const u8 as *const libc::c_char, - 480i32, - b"strcmp(\"single=\" DC_STRINGIFY(DC_CHAT_TYPE_SINGLE), \"single=100\")==0\x00" - as *const u8 as *const libc::c_char, - ); - } else { - }; - if 0 != !(strcmp( - b"group=120\x00" as *const u8 as *const libc::c_char, - b"group=120\x00" as *const u8 as *const libc::c_char, - ) == 0i32) as libc::c_int as libc::c_long - { - __assert_rtn( - (*::std::mem::transmute::<&[u8; 17], &[libc::c_char; 17]>(b"stress_functions\x00")) - .as_ptr(), - b"../cmdline/stress.c\x00" as *const u8 as *const libc::c_char, - 481i32, - b"strcmp(\"group=\" DC_STRINGIFY(DC_CHAT_TYPE_GROUP), \"group=120\")==0\x00" - as *const u8 as *const libc::c_char, - ); - } else { - }; - if 0 != !(strcmp( - b"vgroup=130\x00" as *const u8 as *const libc::c_char, - b"vgroup=130\x00" as *const u8 as *const libc::c_char, - ) == 0i32) as libc::c_int as libc::c_long - { - __assert_rtn( - (*::std::mem::transmute::<&[u8; 17], &[libc::c_char; 17]>(b"stress_functions\x00")) - .as_ptr(), - b"../cmdline/stress.c\x00" as *const u8 as *const libc::c_char, - 482i32, - b"strcmp(\"vgroup=\" DC_STRINGIFY(DC_CHAT_TYPE_VERIFIED_GROUP), \"vgroup=130\")==0\x00" - as *const u8 as *const libc::c_char, - ); - } else { - }; - if 0 != !(strcmp( - b"deaddrop=1\x00" as *const u8 as *const libc::c_char, - b"deaddrop=1\x00" as *const u8 as *const libc::c_char, - ) == 0i32) as libc::c_int as libc::c_long - { - __assert_rtn( - (*::std::mem::transmute::<&[u8; 17], &[libc::c_char; 17]>(b"stress_functions\x00")) - .as_ptr(), - b"../cmdline/stress.c\x00" as *const u8 as *const libc::c_char, - 484i32, - b"strcmp(\"deaddrop=\" DC_STRINGIFY(DC_CHAT_ID_DEADDROP), \"deaddrop=1\")==0\x00" - as *const u8 as *const libc::c_char, - ); - } else { - }; - if 0 != !(strcmp( - b"trash=3\x00" as *const u8 as *const libc::c_char, - b"trash=3\x00" as *const u8 as *const libc::c_char, - ) == 0i32) as libc::c_int as libc::c_long - { - __assert_rtn( - (*::std::mem::transmute::<&[u8; 17], &[libc::c_char; 17]>(b"stress_functions\x00")) - .as_ptr(), - b"../cmdline/stress.c\x00" as *const u8 as *const libc::c_char, - 485i32, - b"strcmp(\"trash=\" DC_STRINGIFY(DC_CHAT_ID_TRASH), \"trash=3\")==0\x00" as *const u8 - as *const libc::c_char, - ); - } else { - }; - if 0 != !(strcmp( - b"in_creation=4\x00" as *const u8 as *const libc::c_char, - b"in_creation=4\x00" as *const u8 as *const libc::c_char, - ) == 0i32) as libc::c_int as libc::c_long - { - __assert_rtn((*::std::mem::transmute::<&[u8; 17], - &[libc::c_char; 17]>(b"stress_functions\x00")).as_ptr(), - b"../cmdline/stress.c\x00" as *const u8 as - *const libc::c_char, 486i32, - b"strcmp(\"in_creation=\" DC_STRINGIFY(DC_CHAT_ID_MSGS_IN_CREATION), \"in_creation=4\")==0\x00" - as *const u8 as *const libc::c_char); - } else { - }; - if 0 != !(strcmp( - b"starred=5\x00" as *const u8 as *const libc::c_char, - b"starred=5\x00" as *const u8 as *const libc::c_char, - ) == 0i32) as libc::c_int as libc::c_long - { - __assert_rtn( - (*::std::mem::transmute::<&[u8; 17], &[libc::c_char; 17]>(b"stress_functions\x00")) - .as_ptr(), - b"../cmdline/stress.c\x00" as *const u8 as *const libc::c_char, - 487i32, - b"strcmp(\"starred=\" DC_STRINGIFY(DC_CHAT_ID_STARRED), \"starred=5\")==0\x00" - as *const u8 as *const libc::c_char, - ); - } else { - }; - if 0 != !(strcmp( - b"archivedlink=6\x00" as *const u8 as *const libc::c_char, - b"archivedlink=6\x00" as *const u8 as *const libc::c_char, - ) == 0i32) as libc::c_int as libc::c_long - { - __assert_rtn((*::std::mem::transmute::<&[u8; 17], - &[libc::c_char; 17]>(b"stress_functions\x00")).as_ptr(), - b"../cmdline/stress.c\x00" as *const u8 as - *const libc::c_char, 488i32, - b"strcmp(\"archivedlink=\" DC_STRINGIFY(DC_CHAT_ID_ARCHIVED_LINK), \"archivedlink=6\")==0\x00" - as *const u8 as *const libc::c_char); - } else { - }; - if 0 != !(strcmp( - b"spcl_chat=9\x00" as *const u8 as *const libc::c_char, - b"spcl_chat=9\x00" as *const u8 as *const libc::c_char, - ) == 0i32) as libc::c_int as libc::c_long - { - __assert_rtn( - (*::std::mem::transmute::<&[u8; 17], &[libc::c_char; 17]>(b"stress_functions\x00")) - .as_ptr(), - b"../cmdline/stress.c\x00" as *const u8 as *const libc::c_char, - 489i32, - b"strcmp(\"spcl_chat=\" DC_STRINGIFY(DC_CHAT_ID_LAST_SPECIAL), \"spcl_chat=9\")==0\x00" - as *const u8 as *const libc::c_char, - ); - } else { - }; - if 0 != !(strcmp( - b"self=1\x00" as *const u8 as *const libc::c_char, - b"self=1\x00" as *const u8 as *const libc::c_char, - ) == 0i32) as libc::c_int as libc::c_long - { - __assert_rtn( - (*::std::mem::transmute::<&[u8; 17], &[libc::c_char; 17]>(b"stress_functions\x00")) - .as_ptr(), - b"../cmdline/stress.c\x00" as *const u8 as *const libc::c_char, - 491i32, - b"strcmp(\"self=\" DC_STRINGIFY(DC_CONTACT_ID_SELF), \"self=1\")==0\x00" as *const u8 - as *const libc::c_char, - ); - } else { - }; - if 0 != !(strcmp( - b"spcl_contact=9\x00" as *const u8 as *const libc::c_char, - b"spcl_contact=9\x00" as *const u8 as *const libc::c_char, - ) == 0i32) as libc::c_int as libc::c_long - { - __assert_rtn((*::std::mem::transmute::<&[u8; 17], - &[libc::c_char; 17]>(b"stress_functions\x00")).as_ptr(), - b"../cmdline/stress.c\x00" as *const u8 as - *const libc::c_char, 492i32, - b"strcmp(\"spcl_contact=\" DC_STRINGIFY(DC_CONTACT_ID_LAST_SPECIAL), \"spcl_contact=9\")==0\x00" - as *const u8 as *const libc::c_char); - } else { - }; - if 0 != !(strcmp( - b"grpimg=3\x00" as *const u8 as *const libc::c_char, - b"grpimg=3\x00" as *const u8 as *const libc::c_char, - ) == 0i32) as libc::c_int as libc::c_long - { - __assert_rtn( - (*::std::mem::transmute::<&[u8; 17], &[libc::c_char; 17]>(b"stress_functions\x00")) - .as_ptr(), - b"../cmdline/stress.c\x00" as *const u8 as *const libc::c_char, - 494i32, - b"strcmp(\"grpimg=\" DC_STRINGIFY(DC_CMD_GROUPIMAGE_CHANGED), \"grpimg=3\")==0\x00" - as *const u8 as *const libc::c_char, - ); - } else { - }; - if 0 != !(strcmp( - b"notverified=0\x00" as *const u8 as *const libc::c_char, - b"notverified=0\x00" as *const u8 as *const libc::c_char, - ) == 0i32) as libc::c_int as libc::c_long - { - __assert_rtn( - (*::std::mem::transmute::<&[u8; 17], &[libc::c_char; 17]>(b"stress_functions\x00")) - .as_ptr(), - b"../cmdline/stress.c\x00" as *const u8 as *const libc::c_char, - 496i32, - b"strcmp(\"notverified=\" DC_STRINGIFY(DC_NOT_VERIFIED), \"notverified=0\")==0\x00" - as *const u8 as *const libc::c_char, - ); - } else { - }; - if 0 != !(strcmp( - b"bidirectional=2\x00" as *const u8 as *const libc::c_char, - b"bidirectional=2\x00" as *const u8 as *const libc::c_char, - ) == 0i32) as libc::c_int as libc::c_long - { - __assert_rtn((*::std::mem::transmute::<&[u8; 17], - &[libc::c_char; 17]>(b"stress_functions\x00")).as_ptr(), - b"../cmdline/stress.c\x00" as *const u8 as - *const libc::c_char, 497i32, - b"strcmp(\"bidirectional=\" DC_STRINGIFY(DC_BIDIRECT_VERIFIED), \"bidirectional=2\")==0\x00" - as *const u8 as *const libc::c_char); - } else { - }; - if 0 != !(strcmp( - b"public=0\x00" as *const u8 as *const libc::c_char, - b"public=0\x00" as *const u8 as *const libc::c_char, - ) == 0i32) as libc::c_int as libc::c_long - { - __assert_rtn( - (*::std::mem::transmute::<&[u8; 17], &[libc::c_char; 17]>(b"stress_functions\x00")) - .as_ptr(), - b"../cmdline/stress.c\x00" as *const u8 as *const libc::c_char, - 499i32, - b"strcmp(\"public=\" DC_STRINGIFY(DC_KEY_PUBLIC), \"public=0\")==0\x00" as *const u8 - as *const libc::c_char, - ); - } else { - }; - if 0 != !(strcmp( - b"private=1\x00" as *const u8 as *const libc::c_char, - b"private=1\x00" as *const u8 as *const libc::c_char, - ) == 0i32) as libc::c_int as libc::c_long - { - __assert_rtn( - (*::std::mem::transmute::<&[u8; 17], &[libc::c_char; 17]>(b"stress_functions\x00")) - .as_ptr(), - b"../cmdline/stress.c\x00" as *const u8 as *const libc::c_char, - 500i32, - b"strcmp(\"private=\" DC_STRINGIFY(DC_KEY_PRIVATE), \"private=1\")==0\x00" as *const u8 - as *const libc::c_char, - ); - } else { - }; - if 0 != !('f' as i32 == 'f' as i32) as libc::c_int as libc::c_long { - __assert_rtn( - (*::std::mem::transmute::<&[u8; 17], &[libc::c_char; 17]>(b"stress_functions\x00")) - .as_ptr(), - b"../cmdline/stress.c\x00" as *const u8 as *const libc::c_char, - 502i32, - b"DC_PARAM_FILE == \'f\'\x00" as *const u8 as *const libc::c_char, - ); - } else { - }; - if 0 != !('w' as i32 == 'w' as i32) as libc::c_int as libc::c_long { - __assert_rtn( - (*::std::mem::transmute::<&[u8; 17], &[libc::c_char; 17]>(b"stress_functions\x00")) - .as_ptr(), - b"../cmdline/stress.c\x00" as *const u8 as *const libc::c_char, - 503i32, - b"DC_PARAM_WIDTH == \'w\'\x00" as *const u8 as *const libc::c_char, - ); - } else { - }; - if 0 != !('h' as i32 == 'h' as i32) as libc::c_int as libc::c_long { - __assert_rtn( - (*::std::mem::transmute::<&[u8; 17], &[libc::c_char; 17]>(b"stress_functions\x00")) - .as_ptr(), - b"../cmdline/stress.c\x00" as *const u8 as *const libc::c_char, - 504i32, - b"DC_PARAM_HEIGHT == \'h\'\x00" as *const u8 as *const libc::c_char, - ); - } else { - }; - if 0 != !('d' as i32 == 'd' as i32) as libc::c_int as libc::c_long { - __assert_rtn( - (*::std::mem::transmute::<&[u8; 17], &[libc::c_char; 17]>(b"stress_functions\x00")) - .as_ptr(), - b"../cmdline/stress.c\x00" as *const u8 as *const libc::c_char, - 505i32, - b"DC_PARAM_DURATION == \'d\'\x00" as *const u8 as *const libc::c_char, - ); - } else { - }; - if 0 != !('m' as i32 == 'm' as i32) as libc::c_int as libc::c_long { - __assert_rtn( - (*::std::mem::transmute::<&[u8; 17], &[libc::c_char; 17]>(b"stress_functions\x00")) - .as_ptr(), - b"../cmdline/stress.c\x00" as *const u8 as *const libc::c_char, - 506i32, - b"DC_PARAM_MIMETYPE == \'m\'\x00" as *const u8 as *const libc::c_char, - ); - } else { - }; - if 0 != !('a' as i32 == 'a' as i32) as libc::c_int as libc::c_long { - __assert_rtn( - (*::std::mem::transmute::<&[u8; 17], &[libc::c_char; 17]>(b"stress_functions\x00")) - .as_ptr(), - b"../cmdline/stress.c\x00" as *const u8 as *const libc::c_char, - 507i32, - b"DC_PARAM_FORWARDED == \'a\'\x00" as *const u8 as *const libc::c_char, - ); - } else { - }; - if 0 != !('U' as i32 == 'U' as i32) as libc::c_int as libc::c_long { - __assert_rtn( - (*::std::mem::transmute::<&[u8; 17], &[libc::c_char; 17]>(b"stress_functions\x00")) - .as_ptr(), - b"../cmdline/stress.c\x00" as *const u8 as *const libc::c_char, - 508i32, - b"DC_PARAM_UNPROMOTED == \'U\'\x00" as *const u8 as *const libc::c_char, - ); - } else { - }; let mut buf1: *mut libc::c_char = strdup(b"ol\xc3\xa1 mundo <>\"\'& \xc3\xa4\xc3\x84\xc3\xb6\xc3\x96\xc3\xbc\xc3\x9c\xc3\x9f foo\xc3\x86\xc3\xa7\xc3\x87 \xe2\x99\xa6&noent;\x00" as *const u8 as *const libc::c_char);