()
| 5 | |
| 6 | #[test] |
| 7 | fn test_base_detection() { |
| 8 | let _session = Session::new().expect("Failed to initialize session"); |
| 9 | let out_dir = env!("OUT_DIR").parse::<PathBuf>().unwrap(); |
| 10 | let view = binaryninja::load(out_dir.join("raw_base_detection_aarch64")) |
| 11 | .expect("Failed to create view"); |
| 12 | let bad = view |
| 13 | .base_address_detection() |
| 14 | .expect("Failed to create base address detection"); |
| 15 | assert!( |
| 16 | bad.detect(&BaseAddressDetectionSettings::default()), |
| 17 | "Detection should succeed on this view" |
| 18 | ); |
| 19 | let result = bad.scores(10); |
| 20 | assert_eq!(result.scores.len(), 3); |
| 21 | assert_eq!( |
| 22 | result.confidence, |
| 23 | BaseAddressDetectionConfidence::HighConfidence |
| 24 | ); |
| 25 | } |
nothing calls this directly
no test coverage detected