diff options
| author | Mason Reed <mason@vector35.com> | 2025-07-03 00:16:37 -0400 |
|---|---|---|
| committer | Mason Reed <mason@vector35.com> | 2025-07-03 00:16:37 -0400 |
| commit | a79e605fe6d94c5b55bf686e39529d4e57d8b6c8 (patch) | |
| tree | 8b3a211ec4b5558feed5892633ca6978494d1f3c /rust/tests | |
| parent | 3caff8aab1090ef69b0e49f8e87a52da7b643481 (diff) | |
[Rust] Add simple binary view tags test
Diffstat (limited to 'rust/tests')
| -rw-r--r-- | rust/tests/binary_view.rs | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/rust/tests/binary_view.rs b/rust/tests/binary_view.rs index a71a0fd1..2db96d61 100644 --- a/rust/tests/binary_view.rs +++ b/rust/tests/binary_view.rs @@ -99,6 +99,16 @@ fn test_binary_view_strings() { assert_eq!(str_15dc.length, 33); } +#[test] +fn test_binary_tags() { + let _session = Session::new().expect("Failed to initialize session"); + let out_dir = env!("OUT_DIR").parse::<PathBuf>().unwrap(); + let view = binaryninja::load(out_dir.join("atox.obj")).expect("Failed to create view"); + let tag_ty = view.create_tag_type("Test", ""); + view.add_tag(0x0, &tag_ty, "t", false); + view.tag_type_by_name("Test").expect("Failed to get tag type"); +} + // These are the target files present in OUT_DIR // Add the files to fixtures/bin static TARGET_FILES: [&str; 2] = ["atox.obj", "atof.obj"]; |
