Skip to content

Instantly share code, notes, and snippets.

@rvantonder
Created November 25, 2014 15:45
Show Gist options
  • Save rvantonder/4132655ec494091ec5bc to your computer and use it in GitHub Desktop.
Save rvantonder/4132655ec494091ec5bc to your computer and use it in GitHub Desktop.
diff --git a/.gitignore b/.gitignore
index f8f1975..0d50f56 100644
--- a/.gitignore
+++ b/.gitignore
@@ -14,5 +14,3 @@
/setup.log
/setup.ml
META
-*.swp
-*.merlin
diff --git a/.merlin b/.merlin
index 498559b..14b9427 100644
--- a/.merlin
+++ b/.merlin
@@ -14,9 +14,3 @@ S lib/bap_dwarf
S lib/bap_elf
S lib/bap_image
S lib/bap_types
-B /home/rvt/ounit-2.0.0/_build/src
-S /home/rvt/ounit-2.0.0/src
-B /home/rvt/janestreet-core/core/_build/lib
-S /home/rvt/janestreet-core/core/lib
-S /home/rvt/.opam/system/build/core_kernel.111.28.00/_build/lib/
-B /home/rvt/.opam/system/build/core_kernel.111.28.00/_build/lib/
diff --git a/_tags.in b/_tags.in
index b414d60..1dedc5c 100644
--- a/_tags.in
+++ b/_tags.in
@@ -1,2 +1 @@
true: short_paths
-true: annot, bin_annot
diff --git a/lib_test/bap_image/test_image.ml b/lib_test/bap_image/test_image.ml
index f69914b..665b48c 100644
--- a/lib_test/bap_image/test_image.ml
+++ b/lib_test/bap_image/test_image.ml
@@ -136,29 +136,6 @@ let assert_cont ~word_size img =
(a1 <> a2 ==> Addr.is_zero diff) in
a2) |> return
-let empty_table = Bap_table.empty
-
-let create_mem ?(addr_size=W32) ?(start_addr=0x00) ?(size=0x08) () =
- let addr = create_addr W32 start_addr in
- let contents = Bigstring.init size ~f:(fun i -> char_of_int (i+0x61)) in
- ok_exn (Bap_memory.create LittleEndian addr contents)
-
-let table =
- let mem = create_mem () in
- ok_exn (Bap_table.add empty_table mem "Memory Tag")
-
-let test_table_len ctxt =
- assert_equal 0 (Bap_table.length empty_table)
-
-let test_table_len2 ctxt =
- assert_equal 1 (Bap_table.length table)
-
-let test_find ctxt =
- let mem_to_find = create_mem () in
- Bap_table.find table mem_to_find |> function
- | Some x -> assert_equal "Memory Tag" x
- | _ -> assert_failure "Wrong"
-
let suite = "Image" >::: [
"to_list:0-15/bytes_32LE" >:: to_list ~word_size:`r8 "0-15_32LE"
~expect:(List.init 16 ~f:ident);
@@ -289,8 +266,4 @@ let suite = "Image" >::: [
let printer = Addr.to_string in
assert_equal ~printer Addr.(mn ++ 0x336) mx;
return ());
-
- "table_length" >:: test_table_len;
- "table_length2" >:: test_table_len2;
- "test_find" >:: test_find;
]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment