Module inline_c::predicates [−][src]
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. |
| PredicateBooleanExt |
|
| PredicateBoxExt |
|
| PredicateFileContentExt |
|
| PredicateNameExt |
|
| PredicateStrExt |
|