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:
Adam Chalmers
2024-03-29 15:56:32 -05:00
committed by GitHub
parent 0360a4021b
commit b0417114af
3 changed files with 26 additions and 0 deletions

View 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, %)

View File

@ -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() {

Binary file not shown.

After

Width:  |  Height:  |  Size: 92 KiB