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
- Predicate factories
Traits§
- Predicate
- Trait for generically evaluating a type against a dynamically created predicate function.
- Predicate
Boolean Ext Predicateextension that adds boolean logic.- Predicate
BoxExt Predicateextension for boxing aPredicate.- Predicate
File Content Ext Predicateextension adapting aslicePredicate.- Predicate
Name Ext Predicateextension that adds naming predicate expressions.- Predicate
StrExt Predicateextension adapting astrPredicate.