Skip to content

Commit

Permalink
Merge branch 'main' into iterion/add-tangential-arc-to-grackle
Browse files Browse the repository at this point in the history
  • Loading branch information
jessfraz authored Mar 15, 2024
2 parents abf6bb4 + 4987965 commit 56df8e7
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 52 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/cargo-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,15 @@ on:
branches:
- main
paths:
- src/wasm-lib/**.rs'
- 'src/wasm-lib/**.rs'
- '**/Cargo.toml'
- '**/Cargo.lock'
- '**/rust-toolchain.toml'
- .github/workflows/cargo-test.yml

pull_request:
paths:
- src/wasm-lib/**.rs'
- 'src/wasm-lib/**.rs'
- '**/Cargo.toml'
- '**/Cargo.lock'
- '**/rust-toolchain.toml'
Expand Down
68 changes: 18 additions & 50 deletions src/wasm-lib/kcl/src/lsp/tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1124,24 +1124,13 @@ async fn test_copilot_lsp_completions_raw() {
let completions = server
.get_completions(
"kcl".to_string(),
r#"// Create a cube.
fn cube = (pos, scale) => {
const sg = startSketchOn('XY')
|> startProfileAt(pos, %)
|> line([0, scale], %)
|> line([scale, 0], %)
|> line([0, -scale], %)
return sg
}
const part001 = cube([0,0], 20)
|> close(%)
|> extrude(20, %)
"#
r#"const bracket = startSketchOn('XY')
|> startProfileAt([0, 0], %)
"#
.to_string(),
r#""#.to_string(),
r#" |> close(%)
|> extrude(10, %)"#
.to_string(),
)
.await
.unwrap();
Expand All @@ -1154,24 +1143,13 @@ const part001 = cube([0,0], 20)
let completions_hit_cache = server
.get_completions(
"kcl".to_string(),
r#"// Create a cube.
fn cube = (pos, scale) => {
const sg = startSketchOn('XY')
|> startProfileAt(pos, %)
|> line([0, scale], %)
|> line([scale, 0], %)
|> line([0, -scale], %)
return sg
}
const part001 = cube([0,0], 20)
|> close(%)
|> extrude(20, %)
"#
r#"const bracket = startSketchOn('XY')
|> startProfileAt([0, 0], %)
"#
.to_string(),
r#""#.to_string(),
r#" |> close(%)
|> extrude(10, %)"#
.to_string(),
)
.await
.unwrap();
Expand Down Expand Up @@ -1202,23 +1180,13 @@ async fn test_copilot_lsp_completions() {
insert_spaces: true,
language_id: "kcl".to_string(),
path: "file:///test.copilot".to_string(),
position: crate::lsp::copilot::types::CopilotPosition { line: 0, character: 1 },
position: crate::lsp::copilot::types::CopilotPosition { line: 3, character: 3 },
relative_path: "test.copilot".to_string(),
source: r#"// Create a cube.
fn cube = (pos, scale) => {
const sg = startSketchOn('XY')
|> startProfileAt(pos, %)
|> line([0, scale], %)
|> line([scale, 0], %)
|> line([0, -scale], %)
return sg
}
const part001 = cube([0,0], 20)
|> close(%)
|> extrude(20, %)
source: r#"const bracket = startSketchOn('XY')
|> startProfileAt([0, 0], %)
|> close(%)
|> extrude(10, %)
"#
.to_string(),
tab_size: 4,
Expand Down

0 comments on commit 56df8e7

Please sign in to comment.