mirror of
https://codeberg.org/unspeaker/tengri.git
synced 2025-12-06 11:46:42 +01:00
parent
4a385b40ff
commit
cb8fd26922
8 changed files with 234 additions and 257 deletions
|
|
@ -143,22 +143,6 @@ mod dsl; pub use self::dsl::*;
|
|||
Ok(())
|
||||
}
|
||||
|
||||
#[cfg(test)] #[test] fn test_dsl_context () {
|
||||
struct Test;
|
||||
#[tengri_proc::expose]
|
||||
impl Test {
|
||||
fn some_bool (&self) -> bool {
|
||||
true
|
||||
}
|
||||
}
|
||||
assert_eq!(Test.get(&Value::Sym(":false")), Some(false));
|
||||
assert_eq!(Test.get(&Value::Sym(":true")), Some(true));
|
||||
assert_eq!(Test.get(&Value::Sym(":some-bool")), Some(true));
|
||||
assert_eq!(Test.get(&Value::Sym(":missing-bool")), None);
|
||||
assert_eq!(Test.get(&Value::Num(0)), Some(false));
|
||||
assert_eq!(Test.get(&Value::Num(1)), Some(true));
|
||||
}
|
||||
|
||||
//#[cfg(test)] #[test] fn test_examples () -> Result<(), ParseError> {
|
||||
//// Let's pretend to render some view.
|
||||
//let source = include_str!("../../tek/src/view_arranger.edn");
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue