summaryrefslogtreecommitdiff
path: root/cli/lsp/testing/lsp_custom.rs
diff options
context:
space:
mode:
authorNayeem Rahman <nayeemrmn99@gmail.com>2022-07-15 18:09:22 +0100
committerGitHub <noreply@github.com>2022-07-15 13:09:22 -0400
commit22a4998e299ca8658744c745d8f0afeba15730dc (patch)
tree1db6f394457a3c1bcb75388560f7d1667ae1a9ac /cli/lsp/testing/lsp_custom.rs
parent635eed93731c3616cacf53860b9aeeeb8cfe158b (diff)
refactor: allocate IDs for tests (#14729)
Diffstat (limited to 'cli/lsp/testing/lsp_custom.rs')
-rw-r--r--cli/lsp/testing/lsp_custom.rs10
1 files changed, 6 insertions, 4 deletions
diff --git a/cli/lsp/testing/lsp_custom.rs b/cli/lsp/testing/lsp_custom.rs
index 8182371ca..59df9884d 100644
--- a/cli/lsp/testing/lsp_custom.rs
+++ b/cli/lsp/testing/lsp_custom.rs
@@ -21,8 +21,9 @@ pub struct TestData {
pub id: String,
/// The human readable test to display for the test.
pub label: String,
- #[serde(skip_serializing_if = "Option::is_none")]
- pub steps: Option<Vec<TestData>>,
+ #[serde(skip_serializing_if = "Vec::is_empty")]
+ #[serde(default)]
+ pub steps: Vec<TestData>,
/// The range where the test is located.
#[serde(skip_serializing_if = "Option::is_none")]
pub range: Option<lsp::Range>,
@@ -92,8 +93,9 @@ pub enum TestRunKind {
pub struct TestRunRequestParams {
pub id: u32,
pub kind: TestRunKind,
- #[serde(skip_serializing_if = "Option::is_none")]
- pub exclude: Option<Vec<TestIdentifier>>,
+ #[serde(skip_serializing_if = "Vec::is_empty")]
+ #[serde(default)]
+ pub exclude: Vec<TestIdentifier>,
#[serde(skip_serializing_if = "Option::is_none")]
pub include: Option<Vec<TestIdentifier>>,
}