Module libafl_inline_c::predicates
source · Expand description
Re-export the prelude of the predicates
crate, which is useful for assertions.
§Example
An end of line on all systems are represented by the \n
character, except on Windows where it is \r\n
. Even if C
writes \n
, it will be translated into \r\n
, so we need to
normalize this. This is where the predicates
crate can be
helpful.
use inline_c::{assert_c, predicates::*};
fn test_predicates() {
(assert_c! {
#include <stdio.h>
int main() {
printf("Hello, World!\n");
return 0;
}
})
.success()
.stdout(predicate::eq("Hello, World!\n").normalize());
}
Modules§
- Predicate factories
Traits§
- Trait for generically evaluating a type against a dynamically created predicate function.
Predicate
extension that adds boolean logic.Predicate
extension for boxing aPredicate
.Predicate
extension adapting aslice
Predicate.Predicate
extension that adds naming predicate expressions.Predicate
extension adapting astr
Predicate.