pub struct TestCase {
pub id: Uuid,
pub source_language: Language,
pub source_code: String,
pub target_language: Language,
pub target_code: Option<String>,
pub result: TestResult,
pub features: CodeFeatures,
pub metadata: GenerationMetadata,
}Expand description
Test case with full metadata
From spec Section 8.1: Generated test case schema.
Fields§
§id: UuidUnique identifier
source_language: LanguageSource language
source_code: StringSource code
target_language: LanguageTarget language
target_code: Option<String>Transpiled code (if successful)
result: TestResultVerification result
features: CodeFeaturesFeatures for ML
metadata: GenerationMetadataGeneration metadata
Implementations§
Source§impl TestCase
impl TestCase
Sourcepub fn new(
generated: &GeneratedCode,
verification: &VerificationResult,
transpiler_version: &str,
) -> Self
pub fn new( generated: &GeneratedCode, verification: &VerificationResult, transpiler_version: &str, ) -> Self
Create a new test case from generation and verification results
Trait Implementations§
Source§impl<'de> Deserialize<'de> for TestCase
impl<'de> Deserialize<'de> for TestCase
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for TestCase
impl RefUnwindSafe for TestCase
impl Send for TestCase
impl Sync for TestCase
impl Unpin for TestCase
impl UnsafeUnpin for TestCase
impl UnwindSafe for TestCase
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more