Subtract tests (#6913)

* add subtract test and cleanup some other tests

Signed-off-by: Jess Frazelle <github@jessfraz.com>

* updates

Signed-off-by: Jess Frazelle <github@jessfraz.com>

* fmt

Signed-off-by: Jess Frazelle <github@jessfraz.com>

---------

Signed-off-by: Jess Frazelle <github@jessfraz.com>
This commit is contained in:
Jess Frazelle
2025-05-13 14:06:10 -07:00
committed by GitHub
parent 2d95e19048
commit cd79059d97
31 changed files with 8611 additions and 99 deletions

View File

@ -2,9 +2,9 @@
use anyhow::Result;
use crate::execution::typed_path::TypedPath;
use crate::{
errors::{KclError, KclErrorDetails},
execution::typed_path::TypedPath,
fs::FileSystem,
SourceRange,
};

View File

@ -2,8 +2,7 @@
use anyhow::Result;
use crate::execution::typed_path::TypedPath;
use crate::SourceRange;
use crate::{execution::typed_path::TypedPath, SourceRange};
#[cfg(not(target_arch = "wasm32"))]
pub mod local;

View File

@ -11,8 +11,7 @@ use tower_lsp::lsp_types::{
TextDocumentItem, WorkspaceFolder,
};
use crate::execution::typed_path::TypedPath;
use crate::fs::FileSystem;
use crate::{execution::typed_path::TypedPath, fs::FileSystem};
/// A trait for the backend of the language server.
#[async_trait::async_trait]

View File

@ -2960,3 +2960,66 @@ mod subtract_regression05 {
super::execute(TEST_NAME, true).await
}
}
mod subtract_regression06 {
const TEST_NAME: &str = "subtract_regression06";
/// Test parsing KCL.
#[test]
fn parse() {
super::parse(TEST_NAME)
}
/// Test that parsing and unparsing KCL produces the original KCL input.
#[tokio::test(flavor = "multi_thread")]
async fn unparse() {
super::unparse(TEST_NAME).await
}
/// Test that KCL is executed correctly.
#[tokio::test(flavor = "multi_thread")]
async fn kcl_test_execute() {
super::execute(TEST_NAME, true).await
}
}
mod fillet_duplicate_tags {
const TEST_NAME: &str = "fillet_duplicate_tags";
/// Test parsing KCL.
#[test]
fn parse() {
super::parse(TEST_NAME)
}
/// Test that parsing and unparsing KCL produces the original KCL input.
#[tokio::test(flavor = "multi_thread")]
async fn unparse() {
super::unparse(TEST_NAME).await
}
/// Test that KCL is executed correctly.
#[tokio::test(flavor = "multi_thread")]
async fn kcl_test_execute() {
super::execute(TEST_NAME, true).await
}
}
mod execute_engine_error_return {
const TEST_NAME: &str = "execute_engine_error_return";
/// Test parsing KCL.
#[test]
fn parse() {
super::parse(TEST_NAME)
}
/// Test that parsing and unparsing KCL produces the original KCL input.
#[tokio::test(flavor = "multi_thread")]
async fn unparse() {
super::unparse(TEST_NAME).await
}
/// Test that KCL is executed correctly.
#[tokio::test(flavor = "multi_thread")]
async fn kcl_test_execute() {
super::execute(TEST_NAME, true).await
}
}