Skip to content

Commit

Permalink
Merge pull request #268 from data-pup/add-diff-all-test
Browse files Browse the repository at this point in the history
add test for printing all items in wee_alloc diff
  • Loading branch information
data-pup authored Mar 14, 2019
2 parents 37ebbee + 465f87d commit 82ee63d
Show file tree
Hide file tree
Showing 2 changed files with 53 additions and 0 deletions.
10 changes: 10 additions & 0 deletions twiggy/tests/all/diff_tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,16 @@ test!(
"5"
);

// TODO: Update this test once `--all` flag is added.
test!(
diff_wee_alloc_all,
"diff",
"./fixtures/wee_alloc.wasm",
"./fixtures/wee_alloc.2.wasm",
"-n",
"100"
);

test!(
diff_wee_alloc_json,
"diff",
Expand Down
43 changes: 43 additions & 0 deletions twiggy/tests/all/expectations/diff_wee_alloc_all
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
Delta Bytes β”‚ Item
─────────────┼─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
-1034 β”Š data[3]
-593 β”Š "function names" subsection
+395 β”Š wee_alloc::alloc_first_fit::he2a4ddf96981c0ce
+243 β”Š goodbye
-225 β”Š wee_alloc::alloc_first_fit::h9a72de3af77ef93f
-152 β”Š wee_alloc::alloc_with_refill::hb32c1bbce9ebda8e
+145 β”Š <wee_alloc::neighbors::Neighbors<'a, T>>::remove::hc9e5d4284e8233b8
-136 β”Š <wee_alloc::size_classes::SizeClassAllocPolicy<'a> as wee_alloc::AllocPolicy>::new_cell_for_free_list::h3987e3054b8224e6
-76 β”Š <wee_alloc::LargeAllocPolicy as wee_alloc::AllocPolicy>::new_cell_for_free_list::h8f071b7bce0301ba
-25 β”Š data[1]
-25 β”Š data[2]
+15 β”Š hello
+15 β”Š import env::rust_oom
-12 β”Š elem[0]
+10 β”Š custom section 'linking' headers
+8 β”Š global[0]
-8 β”Š type[4]: (i32, i32, i32, i32, i32) -> nil
-6 β”Š <wee_alloc::LargeAllocPolicy as wee_alloc::AllocPolicy>::min_cell_size::hc7cee2a550987099
+6 β”Š alloc::alloc::oom::h45ae3f22a516fb04
-6 β”Š type[0]: (i32, i32, i32) -> nil
-6 β”Š type[1]: (i32, i32) -> i32
-5 β”Š <wee_alloc::size_classes::SizeClassAllocPolicy<'a> as wee_alloc::AllocPolicy>::min_cell_size::h6f746be886573355
+5 β”Š type[1]: (i32) -> i32
-4 β”Š __wasm_nullptr
+4 β”Š type[0]: () -> i32
-4 β”Š type[5]: () -> i32
-3 β”Š core::ptr::drop_in_place::h4e5cdfd7b9310648.18
-3 β”Š core::ptr::drop_in_place::h8e9fdc2437d43666
+3 β”Š custom section 'linking'
-3 β”Š element section headers
+3 β”Š global section headers
+3 β”Š import section headers
+2 β”Š data[0]
-1 β”Š data section headers
-1 β”Š func[10]
-1 β”Š func[5]
-1 β”Š func[6]
-1 β”Š func[7]
-1 β”Š func[8]
-1 β”Š func[9]
-1476 β”Š Ξ£ [40 Total Rows]

0 comments on commit 82ee63d

Please sign in to comment.