MCPcopy Create free account
hub / github.com/Vector35/binaryninja-api / progress_simple

Function progress_simple

rust/src/progress.rs:164–180  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

162
163 #[test]
164 fn progress_simple() {
165 let progress = Cell::new(0);
166 let mut callback = |p, _| {
167 progress.set(p);
168 true
169 };
170 callback.progress(0, 100);
171 assert_eq!(progress.get(), 0);
172 callback.progress(1, 100);
173 assert_eq!(progress.get(), 1);
174 callback.progress(50, 100);
175 assert_eq!(progress.get(), 50);
176 callback.progress(99, 100);
177 assert_eq!(progress.get(), 99);
178 callback.progress(100, 100);
179 assert_eq!(progress.get(), 100);
180 }
181
182 #[test]
183 fn progress_simple_split() {

Callers

nothing calls this directly

Calls 1

progressMethod · 0.45

Tested by

no test coverage detected