This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#[test] | |
fn test_neat_xor() { | |
#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)] | |
enum Input { | |
A, | |
B, | |
Control, | |
} | |
#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
let registry = Registry::default().with_basic_types(); | |
let mut context = Context::new(10240, 10240); | |
let mut lib = FfiLibrary::new("../../target/debug/ffi").unwrap(); | |
let ffi_add = lib | |
.function(function_signature!(®istry => fn add(a: i32, b: i32) -> (result: i32))) | |
.unwrap(); | |
let ffi_ensure = lib | |
.function(function_signature!(®istry => fn ensure_42(v: i32) -> ())) | |
.unwrap(); | |
context.stack().push(2i32); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#[test] | |
fn test_editable() { | |
let mut editable = Editable::new(0usize); | |
assert_eq!(editable.done_count(), 0); | |
assert_eq!(editable.undone_count(), 0); | |
editable | |
.edit_snapshot("set 42", |data| { | |
*data = 42; | |
Ok(()) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
use crate::{ | |
graph::Graph, | |
query::{Is, Node, Query, Related, Traverse}, | |
AnyIndex, | |
}; | |
struct Child; | |
struct Parent; | |
struct Effect; | |
struct Attribute; |
OlderNewer