artichoke_backend/extn/core/kernel/
mod.rs

1mod integer;
2pub(in crate::extn) mod mruby;
3pub mod require;
4pub(super) mod trampoline;
5
6#[allow(unused_imports)]
7pub use trampoline::integer;
8
9#[derive(Debug, Clone, Copy)]
10pub struct Kernel;
11
12#[cfg(test)]
13mod tests {
14    use crate::test::prelude::*;
15
16    const SUBJECT: &str = "Kernel";
17    const FUNCTIONAL_TEST: &[u8] = include_bytes!("kernel_test.rb");
18
19    #[test]
20    fn functional() {
21        let mut interp = interpreter();
22        let result = interp.eval(FUNCTIONAL_TEST);
23        unwrap_or_panic_with_backtrace(&mut interp, SUBJECT, result);
24        let result = interp.eval(b"spec");
25        unwrap_or_panic_with_backtrace(&mut interp, SUBJECT, result);
26    }
27}