refactor: allocate IDs for tests (#14729)

This commit is contained in:
Nayeem Rahman 2022-07-15 18:09:22 +01:00 committed by GitHub
parent 635eed9373
commit 22a4998e29
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
12 changed files with 795 additions and 845 deletions

View file

@ -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>>,
}