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§

Traits§