Change over more code

This commit is contained in:
Adam Chalmers
2024-09-25 11:58:28 -05:00
parent 2a85ea26ad
commit 0568663ff4
5 changed files with 20 additions and 20 deletions

View File

@ -2207,7 +2207,7 @@ fn hmm = (x) => {
return x
}
const yo = 5 + 6
let yo = 5 + 6
const abc = 3
const identifierGuy = 5

View File

@ -1759,7 +1759,7 @@ mod tests {
#[test]
fn test_comments_in_function2() {
let test_program = r#"() => {
const yo = { a: { b: { c: '123' } } } /* block
let yo = { a: { b: { c: '123' } } } /* block
comment */
}"#;
let tokens = crate::token::lexer(test_program).unwrap();
@ -1899,7 +1899,7 @@ const mySk1 = startSketchAt([0, 0])"#;
#[test]
fn many_comments() {
let test_program = r#"// this is a comment
const yo = { a: { b: { c: '123' } } } /* block
let yo = { a: { b: { c: '123' } } } /* block
comment */
const key = 'c'
@ -1957,7 +1957,7 @@ const mySk1 = startSketchAt([0, 0])"#;
#[test]
fn inline_block_comments() {
let test_program = r#"const yo = 3 /* block
let test_program = r#"let yo = 3 /* block
comment */
return 1"#;

View File

@ -1114,7 +1114,7 @@ show(part001)"#;
fn test_program3() {
let program = r#"
// this is a comment
const yo = { a: { b: { c: '123' } } }
let yo = { a: { b: { c: '123' } } }
const key = 'c'
const things = "things"

View File

@ -1302,7 +1302,7 @@ const tabs_l = startSketchOn({
fn test_recast_comment_in_a_fn_block() {
let some_program_string = r#"fn myFn = () => {
// this is a comment
const yo = { a: { b: { c: '123' } } } /* block
let yo = { a: { b: { c: '123' } } } /* block
comment */
const key = 'c'
@ -1318,7 +1318,7 @@ const tabs_l = startSketchOn({
recasted,
r#"fn myFn = () => {
// this is a comment
const yo = { a: { b: { c: '123' } } } /* block
let yo = { a: { b: { c: '123' } } } /* block
comment */
const key = 'c'
@ -1519,13 +1519,13 @@ const mySk1 = startSketchOn('XY')
fn test_recast_first_level_object() {
let some_program_string = r#"const three = 3
const yo = {
let yo = {
aStr: 'str',
anum: 2,
identifier: three,
binExp: 4 + 5
}
const yo = [
let yo = [
1,
" 2,",
"three",
@ -1545,7 +1545,7 @@ const yo = [
fn test_recast_new_line_before_comment() {
let some_program_string = r#"
// this is a comment
const yo = { a: { b: { c: '123' } } }
let yo = { a: { b: { c: '123' } } }
const key = 'c'
const things = "things"

View File

@ -353,7 +353,7 @@ fn roundedRectangle = (pos, w, l, cornerRadius) => {
const holeRadius = 1
const holeIndex = 6
const part = roundedRectangle([0, 0], 20, 20, 4)
let part = roundedRectangle([0, 0], 20, 20, 4)
|> hole(circle({ center: [-holeIndex, holeIndex], radius: holeRadius }, %), %)
|> hole(circle({ center: [holeIndex, holeIndex], radius: holeRadius }, %), %)
|> hole(circle({ center: [-holeIndex, -holeIndex], radius: holeRadius }, %), %)
@ -377,7 +377,7 @@ async fn kcl_test_top_level_expression() {
async fn kcl_test_patterns_linear_basic_with_math() {
let code = r#"const num = 12
const distance = 5
const part = startSketchOn('XY')
let part = startSketchOn('XY')
|> circle({ center: [0,0], radius: 2 }, %)
|> patternLinear2d({axis: [0,1], repetitions: num -1, distance: distance - 1}, %)
|> extrude(1, %)
@ -389,7 +389,7 @@ const part = startSketchOn('XY')
#[tokio::test(flavor = "multi_thread")]
async fn kcl_test_patterns_linear_basic() {
let code = r#"const part = startSketchOn('XY')
let code = r#"let part = startSketchOn('XY')
|> circle({ center: [0,0], radius: 2 }, %)
|> patternLinear2d({axis: [0,1], repetitions: 12, distance: 4}, %)
|> extrude(1, %)
@ -401,7 +401,7 @@ async fn kcl_test_patterns_linear_basic() {
#[tokio::test(flavor = "multi_thread")]
async fn kcl_test_patterns_linear_basic_3d() {
let code = r#"const part = startSketchOn('XY')
let code = r#"let part = startSketchOn('XY')
|> startProfileAt([0, 0], %)
|> line([0,1], %)
|> line([1, 0], %)
@ -417,7 +417,7 @@ async fn kcl_test_patterns_linear_basic_3d() {
#[tokio::test(flavor = "multi_thread")]
async fn kcl_test_patterns_linear_basic_negative_distance() {
let code = r#"const part = startSketchOn('XY')
let code = r#"let part = startSketchOn('XY')
|> circle({ center: [0,0], radius: 2 }, %)
|> patternLinear2d({axis: [0,1], repetitions: 12, distance: -2}, %)
|> extrude(1, %)
@ -429,7 +429,7 @@ async fn kcl_test_patterns_linear_basic_negative_distance() {
#[tokio::test(flavor = "multi_thread")]
async fn kcl_test_patterns_linear_basic_negative_axis() {
let code = r#"const part = startSketchOn('XY')
let code = r#"let part = startSketchOn('XY')
|> circle({ center: [0,0], radius: 2 }, %)
|> patternLinear2d({axis: [0,-1], repetitions: 12, distance: 2}, %)
|> extrude(1, %)
@ -462,7 +462,7 @@ const rectangle = startSketchOn('XY')
#[tokio::test(flavor = "multi_thread")]
async fn kcl_test_patterns_circular_basic_2d() {
let code = r#"const part = startSketchOn('XY')
let code = r#"let part = startSketchOn('XY')
|> circle({ center: [0,0], radius: 2 }, %)
|> patternCircular2d({center: [20, 20], repetitions: 12, arcDegrees: 210, rotateDuplicates: true}, %)
|> extrude(1, %)
@ -474,7 +474,7 @@ async fn kcl_test_patterns_circular_basic_2d() {
#[tokio::test(flavor = "multi_thread")]
async fn kcl_test_patterns_circular_basic_3d() {
let code = r#"const part = startSketchOn('XY')
let code = r#"let part = startSketchOn('XY')
|> startProfileAt([0, 0], %)
|> line([0,1], %)
|> line([1, 0], %)
@ -490,7 +490,7 @@ async fn kcl_test_patterns_circular_basic_3d() {
#[tokio::test(flavor = "multi_thread")]
async fn kcl_test_patterns_circular_3d_tilted_axis() {
let code = r#"const part = startSketchOn('XY')
let code = r#"let part = startSketchOn('XY')
|> startProfileAt([0, 0], %)
|> line([0,1], %)
|> line([1, 0], %)
@ -845,7 +845,7 @@ const holeRadius = 1
const holeIndex = 6
// Create the mounting plate extrusion, holes, and fillets
const part = rectShape([0, 0], 20, 20)
let part = rectShape([0, 0], 20, 20)
|> hole(circle('XY', [-holeIndex, holeIndex], holeRadius), %)
|> hole(circle('XY', [holeIndex, holeIndex], holeRadius), %)
|> hole(circle('XY', [-holeIndex, -holeIndex], holeRadius), %)