New test case: Paul's riddle, shortened (#1970)
This is discussed in https://github.com/KittyCAD/modeling-app/issues/1969
This commit is contained in:
17
src/wasm-lib/tests/executor/inputs/riddle_small.kcl
Normal file
17
src/wasm-lib/tests/executor/inputs/riddle_small.kcl
Normal file
@ -0,0 +1,17 @@
|
||||
const ANSWER = 41803
|
||||
|
||||
fn m = (s) => {
|
||||
return (ANSWER * s + 12345) % 214748
|
||||
}
|
||||
|
||||
let xs = 205804
|
||||
let ys = 71816
|
||||
let ox = 35 - (m(xs) % 70)
|
||||
let oy = 35 - (m(ys) % 70)
|
||||
const r = startSketchOn('XZ')
|
||||
|> startProfileAt([ox, oy], %)
|
||||
|> line([1, 0], %)
|
||||
|> line([0, -1], %)
|
||||
|> line([-1, 0], %)
|
||||
|> close(%)
|
||||
|> extrude(1, %)
|
@ -111,6 +111,15 @@ const part002 = startSketchOn(part001, "here")
|
||||
.unwrap();
|
||||
twenty_twenty::assert_image("tests/executor/outputs/sketch_on_face.png", &result, 0.999);
|
||||
}
|
||||
#[tokio::test(flavor = "multi_thread")]
|
||||
async fn serial_test_riddle_small() {
|
||||
let code = include_str!("inputs/riddle_small.kcl");
|
||||
|
||||
let result = execute_and_snapshot(code, kittycad::types::UnitLength::Mm)
|
||||
.await
|
||||
.unwrap();
|
||||
twenty_twenty::assert_image("tests/executor/outputs/riddle_small.png", &result, 0.999);
|
||||
}
|
||||
|
||||
#[tokio::test(flavor = "multi_thread")]
|
||||
async fn serial_test_sketch_on_face_start() {
|
||||
|
BIN
src/wasm-lib/tests/executor/outputs/riddle_small.png
Normal file
BIN
src/wasm-lib/tests/executor/outputs/riddle_small.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 92 KiB |
Reference in New Issue
Block a user