diff options
| author | Laurenz <laurmaedje@gmail.com> | 2023-09-11 14:42:43 +0200 |
|---|---|---|
| committer | Laurenz <laurmaedje@gmail.com> | 2023-09-11 14:42:43 +0200 |
| commit | 305524d005df075d53575552ee090fb53192a3fe (patch) | |
| tree | 08b739e8fc41057b79a2d7ea7a7208ca358d60b3 /tests/src/tests.rs | |
| parent | b471ac7d590abd2398ce25193b4e4df373bf2e9c (diff) | |
Update tests for type system changes
Diffstat (limited to 'tests/src/tests.rs')
| -rw-r--r-- | tests/src/tests.rs | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/tests/src/tests.rs b/tests/src/tests.rs index fee6f2b7..b575b4d4 100644 --- a/tests/src/tests.rs +++ b/tests/src/tests.rs @@ -151,8 +151,6 @@ fn main() { } fn library() -> Library { - /// Display: Test - /// Category: test #[func] fn test(lhs: Value, rhs: Value) -> StrResult<NoneValue> { if lhs != rhs { @@ -161,8 +159,6 @@ fn library() -> Library { Ok(NoneValue) } - /// Display: Print - /// Category: test #[func] fn print(#[variadic] values: Vec<Value>) -> NoneValue { let mut stdout = io::stdout().lock(); @@ -191,8 +187,8 @@ fn library() -> Library { lib.styles.set(TextElem::set_size(TextSize(Abs::pt(10.0).into()))); // Hook up helpers into the global scope. - lib.global.scope_mut().define("test", test_func()); - lib.global.scope_mut().define("print", print_func()); + lib.global.scope_mut().define_func::<test>(); + lib.global.scope_mut().define_func::<print>(); lib.global .scope_mut() .define("conifer", RgbaColor::new(0x9f, 0xEB, 0x52, 0xFF)); |
