Home
last modified time | relevance | path

Searched refs:assert_parse (Results 1 – 5 of 5) sorted by relevance

/third_party/rust/crates/nom/src/number/
Dstreaming.rs1627 macro_rules! assert_parse( macro
1636 assert_parse!(be_i8(&[0x00][..]), Ok((&b""[..], 0))); in i8_tests()
1637 assert_parse!(be_i8(&[0x7f][..]), Ok((&b""[..], 127))); in i8_tests()
1638 assert_parse!(be_i8(&[0xff][..]), Ok((&b""[..], -1))); in i8_tests()
1639 assert_parse!(be_i8(&[0x80][..]), Ok((&b""[..], -128))); in i8_tests()
1640 assert_parse!(be_i8(&[][..]), Err(Err::Incomplete(Needed::new(1)))); in i8_tests()
1645 assert_parse!(be_i16(&[0x00, 0x00][..]), Ok((&b""[..], 0))); in i16_tests()
1646 assert_parse!(be_i16(&[0x7f, 0xff][..]), Ok((&b""[..], 32_767_i16))); in i16_tests()
1647 assert_parse!(be_i16(&[0xff, 0xff][..]), Ok((&b""[..], -1))); in i16_tests()
1648 assert_parse!(be_i16(&[0x80, 0x00][..]), Ok((&b""[..], -32_768_i16))); in i16_tests()
[all …]
Dcomplete.rs1654 macro_rules! assert_parse( macro
1663 assert_parse!(i8(&[0x00][..]), Ok((&b""[..], 0))); in i8_tests()
1664 assert_parse!(i8(&[0x7f][..]), Ok((&b""[..], 127))); in i8_tests()
1665 assert_parse!(i8(&[0xff][..]), Ok((&b""[..], -1))); in i8_tests()
1666 assert_parse!(i8(&[0x80][..]), Ok((&b""[..], -128))); in i8_tests()
1671 assert_parse!(be_i8(&[0x00][..]), Ok((&b""[..], 0))); in be_i8_tests()
1672 assert_parse!(be_i8(&[0x7f][..]), Ok((&b""[..], 127))); in be_i8_tests()
1673 assert_parse!(be_i8(&[0xff][..]), Ok((&b""[..], -1))); in be_i8_tests()
1674 assert_parse!(be_i8(&[0x80][..]), Ok((&b""[..], -128))); in be_i8_tests()
1679 assert_parse!(be_i16(&[0x00, 0x00][..]), Ok((&b""[..], 0))); in be_i16_tests()
[all …]
/third_party/rust/crates/nom/src/combinator/
Dtests.rs11 macro_rules! assert_parse( macro
33 assert_parse!( in eof_on_slices()
39 assert_parse!(res_over, Ok((is_over, is_over))); in eof_on_slices()
48 assert_parse!( in eof_on_strs()
54 assert_parse!(res_over, Ok((is_over, is_over))); in eof_on_strs()
76 assert_parse!(rest(input), Ok((empty, input))); in rest_on_slices()
83 assert_parse!(rest(input), Ok((empty, input))); in rest_on_strs()
89 assert_parse!(rest_len(input), Ok((input, input.len()))); in rest_len_on_slices()
119 assert_parse!( in test_flat_map()
128 assert_parse!( in test_map_opt()
[all …]
/third_party/rust/crates/nom/src/character/
Dstreaming.rs746 macro_rules! assert_parse( macro
768 assert_parse!(alpha1(a), Err(Err::Incomplete(Needed::new(1)))); in character()
998 assert_parse!(hex_digit1(i), Ok((&b";"[..], &i[..i.len() - 1]))); in hex_digit_test()
1001 assert_parse!( in hex_digit_test()
1007 assert_parse!( in hex_digit_test()
1029 assert_parse!(oct_digit1(i), Ok((&b";"[..], &i[..i.len() - 1]))); in oct_digit_test()
1032 assert_parse!( in oct_digit_test()
1073 assert_parse!(output, Ok((&b""[..], &b"\r\n"[..]))); in check_windows_lineending()
1080 assert_parse!(output, Ok((&b""[..], &b"\n"[..]))); in check_unix_lineending()
1085 assert_parse!(crlf(&b"\r\na"[..]), Ok((&b"a"[..], &b"\r\n"[..]))); in cr_lf()
[all …]
Dcomplete.rs838 macro_rules! assert_parse( macro
855 assert_parse!(alpha1(a), Ok((empty, a))); in character()
1032 assert_parse!(hex_digit1(i), Ok((&b";"[..], &i[..i.len() - 1]))); in hex_digit_test()
1035 assert_parse!( in hex_digit_test()
1041 assert_parse!( in hex_digit_test()
1063 assert_parse!(oct_digit1(i), Ok((&b";"[..], &i[..i.len() - 1]))); in oct_digit_test()
1066 assert_parse!( in oct_digit_test()
1109 assert_parse!(output, Ok((&b""[..], &b"\r\n"[..]))); in check_windows_lineending()
1116 assert_parse!(output, Ok((&b""[..], &b"\n"[..]))); in check_unix_lineending()
1121 assert_parse!(crlf(&b"\r\na"[..]), Ok((&b"a"[..], &b"\r\n"[..]))); in cr_lf()
[all …]