From e6e2c8d4c4043ee454936f6d617f84d98a4303ce Mon Sep 17 00:00:00 2001 From: jedel1043 Date: Mon, 20 Mar 2023 16:08:36 -0600 Subject: [PATCH] Derive `Default` for `SpecVersion` --- boa_tester/src/main.rs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/boa_tester/src/main.rs b/boa_tester/src/main.rs index 529c8854d6e..11276483340 100644 --- a/boa_tester/src/main.rs +++ b/boa_tester/src/main.rs @@ -384,7 +384,7 @@ struct SuiteResult { struct TestResult { #[serde(rename = "n")] name: Box, - #[serde(rename = "v")] + #[serde(rename = "v", default)] spec_version: SpecVersion, #[serde(rename = "s", default)] strict: bool, @@ -406,11 +406,12 @@ enum TestOutcomeResult { Panic, } -#[derive(Debug, Serialize, Clone, Copy, Deserialize, PartialEq)] +#[derive(Debug, Serialize, Clone, Copy, Deserialize, PartialEq, Default)] #[serde(untagged)] enum SpecVersion { ES5 = 5, ES6 = 6, + #[default] ES13 = 13, }