clean doc
This commit is contained in:
parent
b5ae8c5088
commit
df2a441148
13 changed files with 84 additions and 80 deletions
|
|
@ -1,5 +1,5 @@
|
|||
//! The string representation, encoded in MUTF-8
|
||||
//! https://source.android.com/docs/core/runtime/dex-format#mutf-8
|
||||
//! <https://source.android.com/docs/core/runtime/dex-format#mutf-8>
|
||||
//!
|
||||
//! The encoding of codepoint in MUTF-8 is as following (table from
|
||||
//! <https://py2jdbc.readthedocs.io/en/latest/mutf8.html>):
|
||||
|
|
@ -16,7 +16,7 @@ use crate as androscalpel_serializer;
|
|||
use crate::core::*;
|
||||
pub use androscalpel_serializer_derive::*;
|
||||
|
||||
/// [string-data-item](https://source.android.com/docs/core/runtime/dex-format#string-data-item)
|
||||
/// <https://source.android.com/docs/core/runtime/dex-format#string-data-item>
|
||||
#[derive(Serializable, PartialEq, Eq, Debug)]
|
||||
pub struct StringDataItem {
|
||||
pub utf16_size: Uleb128,
|
||||
|
|
@ -251,8 +251,8 @@ impl StringDataItem {
|
|||
mod test {
|
||||
use super::*;
|
||||
|
||||
/// Test for bug found in https://github.com/TkTech/mutf8/tree/master:
|
||||
/// https://github.com/TkTech/mutf8/blob/master/tests/test_bugs.py
|
||||
/// Test for bug found in <https://github.com/TkTech/mutf8/tree/master>:
|
||||
/// <https://github.com/TkTech/mutf8/blob/master/tests/test_bugs.py>
|
||||
#[test]
|
||||
fn bug_tktech_mutf8() {
|
||||
let string_issue_1 = "[가 나 다 라 마 바 사 아 자 차 카 타 파 하]";
|
||||
|
|
@ -285,8 +285,8 @@ mod test {
|
|||
assert_eq!(&decoded, string_issue_3);
|
||||
}
|
||||
|
||||
/// Test from https://github.com/TkTech/mutf8/tree/master, test for bad encoding
|
||||
/// Test for bug found in https://github.com/TkTech/mutf8/tree/master:
|
||||
/// Test from <https://github.com/TkTech/mutf8/tree/master>, test for bad encoding
|
||||
/// Test for bug found in <https://github.com/TkTech/mutf8/tree/master>:
|
||||
#[test]
|
||||
fn test_tktech_bad_mutf8() {
|
||||
assert!(TryInto::<String>::try_into(StringDataItem {
|
||||
|
|
@ -311,8 +311,8 @@ mod test {
|
|||
.is_err());
|
||||
}
|
||||
|
||||
/// Test from https://github.com/TkTech/mutf8/tree/master, test 2 bytes
|
||||
/// Test for bug found in https://github.com/TkTech/mutf8/tree/master:
|
||||
/// Test from <https://github.com/TkTech/mutf8/tree/master>, test 2 bytes
|
||||
/// Test for bug found in <https://github.com/TkTech/mutf8/tree/master>:
|
||||
#[test]
|
||||
fn test_tktech_2_bytes_mutf8() {
|
||||
let tests = vec![
|
||||
|
|
@ -350,8 +350,8 @@ mod test {
|
|||
}
|
||||
}
|
||||
|
||||
/// Test from https://github.com/TkTech/mutf8/tree/master, test 3 bytes
|
||||
/// Test for bug found in https://github.com/TkTech/mutf8/tree/master:
|
||||
/// Test from <https://github.com/TkTech/mutf8/tree/master>, test 3 bytes
|
||||
/// Test for bug found in <https://github.com/TkTech/mutf8/tree/master>:
|
||||
#[test]
|
||||
fn test_tktech_3_bytes_mutf8() {
|
||||
let tests = vec![
|
||||
|
|
@ -411,8 +411,8 @@ mod test {
|
|||
}
|
||||
}
|
||||
|
||||
/// Test from https://github.com/TkTech/mutf8/tree/master, test 6 bytes
|
||||
/// Test for bug found in https://github.com/TkTech/mutf8/tree/master:
|
||||
/// Test from <https://github.com/TkTech/mutf8/tree/master>, test 6 bytes
|
||||
/// Test for bug found in <https://github.com/TkTech/mutf8/tree/master>:
|
||||
#[test]
|
||||
fn test_tktech_6_bytes_mutf8() {
|
||||
let tests = vec![
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue