top level expressions fix (#1046)
#1033 top level expressions fix Signed-off-by: Jess Frazelle <github@jessfraz.com>
This commit is contained in:
@ -518,3 +518,23 @@ show(part)"#;
|
||||
let result = execute_and_snapshot(code).await.unwrap();
|
||||
twenty_twenty::assert_image("tests/executor/outputs/rounded_with_holes.png", &result, 0.999);
|
||||
}
|
||||
|
||||
#[tokio::test(flavor = "multi_thread")]
|
||||
async fn serial_test_top_level_expression() {
|
||||
let code = r#"fn circle = (pos, radius) => {
|
||||
const sg = startSketchOn('XY')
|
||||
|> startProfileAt([pos[0] + radius, pos[1]], %)
|
||||
|> arc({
|
||||
angle_end: 360,
|
||||
angle_start: 0,
|
||||
radius: radius
|
||||
}, %)
|
||||
|> close(%)
|
||||
return sg
|
||||
}
|
||||
|
||||
circle([0,0], 22) |> extrude(14, %)"#;
|
||||
|
||||
let result = execute_and_snapshot(code).await.unwrap();
|
||||
twenty_twenty::assert_image("tests/executor/outputs/top_level_expression.png", &result, 0.999);
|
||||
}
|
||||
|
BIN
src/wasm-lib/tests/executor/outputs/top_level_expression.png
Normal file
BIN
src/wasm-lib/tests/executor/outputs/top_level_expression.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 98 KiB |
Reference in New Issue
Block a user