Skip to content

Commit 82ee63d

Browse files
authored
Merge pull request #268 from data-pup/add-diff-all-test
add test for printing all items in wee_alloc diff
2 parents 37ebbee + 465f87d commit 82ee63d

File tree

2 files changed

+53
-0
lines changed

2 files changed

+53
-0
lines changed

β€Žtwiggy/tests/all/diff_tests.rs

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,16 @@ test!(
1414
"5"
1515
);
1616

17+
// TODO: Update this test once `--all` flag is added.
18+
test!(
19+
diff_wee_alloc_all,
20+
"diff",
21+
"./fixtures/wee_alloc.wasm",
22+
"./fixtures/wee_alloc.2.wasm",
23+
"-n",
24+
"100"
25+
);
26+
1727
test!(
1828
diff_wee_alloc_json,
1929
"diff",
Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
Delta Bytes β”‚ Item
2+
─────────────┼─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
3+
-1034 β”Š data[3]
4+
-593 β”Š "function names" subsection
5+
+395 β”Š wee_alloc::alloc_first_fit::he2a4ddf96981c0ce
6+
+243 β”Š goodbye
7+
-225 β”Š wee_alloc::alloc_first_fit::h9a72de3af77ef93f
8+
-152 β”Š wee_alloc::alloc_with_refill::hb32c1bbce9ebda8e
9+
+145 β”Š <wee_alloc::neighbors::Neighbors<'a, T>>::remove::hc9e5d4284e8233b8
10+
-136 β”Š <wee_alloc::size_classes::SizeClassAllocPolicy<'a> as wee_alloc::AllocPolicy>::new_cell_for_free_list::h3987e3054b8224e6
11+
-76 β”Š <wee_alloc::LargeAllocPolicy as wee_alloc::AllocPolicy>::new_cell_for_free_list::h8f071b7bce0301ba
12+
-25 β”Š data[1]
13+
-25 β”Š data[2]
14+
+15 β”Š hello
15+
+15 β”Š import env::rust_oom
16+
-12 β”Š elem[0]
17+
+10 β”Š custom section 'linking' headers
18+
+8 β”Š global[0]
19+
-8 β”Š type[4]: (i32, i32, i32, i32, i32) -> nil
20+
-6 β”Š <wee_alloc::LargeAllocPolicy as wee_alloc::AllocPolicy>::min_cell_size::hc7cee2a550987099
21+
+6 β”Š alloc::alloc::oom::h45ae3f22a516fb04
22+
-6 β”Š type[0]: (i32, i32, i32) -> nil
23+
-6 β”Š type[1]: (i32, i32) -> i32
24+
-5 β”Š <wee_alloc::size_classes::SizeClassAllocPolicy<'a> as wee_alloc::AllocPolicy>::min_cell_size::h6f746be886573355
25+
+5 β”Š type[1]: (i32) -> i32
26+
-4 β”Š __wasm_nullptr
27+
+4 β”Š type[0]: () -> i32
28+
-4 β”Š type[5]: () -> i32
29+
-3 β”Š core::ptr::drop_in_place::h4e5cdfd7b9310648.18
30+
-3 β”Š core::ptr::drop_in_place::h8e9fdc2437d43666
31+
+3 β”Š custom section 'linking'
32+
-3 β”Š element section headers
33+
+3 β”Š global section headers
34+
+3 β”Š import section headers
35+
+2 β”Š data[0]
36+
-1 β”Š data section headers
37+
-1 β”Š func[10]
38+
-1 β”Š func[5]
39+
-1 β”Š func[6]
40+
-1 β”Š func[7]
41+
-1 β”Š func[8]
42+
-1 β”Š func[9]
43+
-1476 β”Š Ξ£ [40 Total Rows]

0 commit comments

Comments
Β (0)