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:
@ -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,
|
||||
};
|
||||
|
@ -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;
|
||||
|
@ -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]
|
||||
|
@ -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
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user