This is an automated email from the ASF dual-hosted git repository.
kriskras99 pushed a commit to branch feat/full_enum_support
in repository https://gitbox.apache.org/repos/asf/avro-rs.git
The following commit(s) were added to refs/heads/feat/full_enum_support by this
push:
new 757c25e fix: Add missing license header and set PR number for tests
757c25e is described below
commit 757c25e99b41f3120c732e107fe736392cfabe7d
Author: Kriskras99 <[email protected]>
AuthorDate: Fri Mar 20 10:23:04 2026 +0000
fix: Add missing license header and set PR number for tests
---
avro/src/serde/derive.rs | 16 +++++------
avro/src/serde/deser_schema/mod.rs | 34 +++++++++++------------
avro/src/serde/ser_schema/record/field_default.rs | 17 ++++++++++++
licenserc.toml | 3 +-
4 files changed, 44 insertions(+), 26 deletions(-)
diff --git a/avro/src/serde/derive.rs b/avro/src/serde/derive.rs
index 4ab1f95..b1685e7 100644
--- a/avro/src/serde/derive.rs
+++ b/avro/src/serde/derive.rs
@@ -1094,7 +1094,7 @@ mod tests {
}
#[test]
- fn avro_rs_xxx_std_time_duration() -> TestResult {
+ fn avro_rs_512_std_time_duration() -> TestResult {
let schema = Schema::parse_str(
r#"{
"type": "record",
@@ -1122,7 +1122,7 @@ mod tests {
}
#[test]
- fn avro_rs_xxx_0_array() -> TestResult {
+ fn avro_rs_512_0_array() -> TestResult {
assert_eq!(Schema::Null, <[String; 0]>::get_schema());
assert_eq!(Schema::Null, <[(); 0]>::get_schema());
assert_eq!(Schema::Null, <[bool; 0]>::get_schema());
@@ -1130,7 +1130,7 @@ mod tests {
}
#[test]
- fn avro_rs_xxx_1_array() -> TestResult {
+ fn avro_rs_512_1_array() -> TestResult {
assert_eq!(Schema::String, <[String; 1]>::get_schema());
assert_eq!(Schema::Null, <[(); 1]>::get_schema());
assert_eq!(Schema::Boolean, <[bool; 1]>::get_schema());
@@ -1138,7 +1138,7 @@ mod tests {
}
#[test]
- fn avro_rs_xxx_n_array() -> TestResult {
+ fn avro_rs_512_n_array() -> TestResult {
let schema = Schema::parse_str(
r#"{
"type": "record",
@@ -1158,7 +1158,7 @@ mod tests {
}
#[test]
- fn avro_rs_xxx_n_array_complex_type() -> TestResult {
+ fn avro_rs_512_n_array_complex_type() -> TestResult {
let schema = Schema::parse_str(
r#"{
"type": "record",
@@ -1175,7 +1175,7 @@ mod tests {
}
#[test]
- fn avro_rs_xxx_1_tuple() -> TestResult {
+ fn avro_rs_512_1_tuple() -> TestResult {
assert_eq!(Schema::String, <(String,)>::get_schema());
assert_eq!(Schema::Null, <((),)>::get_schema());
assert_eq!(Schema::Boolean, <(bool,)>::get_schema());
@@ -1183,7 +1183,7 @@ mod tests {
}
#[test]
- fn avro_rs_xxx_n_tuple() -> TestResult {
+ fn avro_rs_512_n_tuple() -> TestResult {
let schema = Schema::parse_str(
r#"{
"type": "record",
@@ -1203,7 +1203,7 @@ mod tests {
}
#[test]
- fn avro_rx_xxx_n_tuple_complex_type() -> TestResult {
+ fn avro_rs_512_n_tuple_complex_type() -> TestResult {
let schema = Schema::parse_str(
r#"{
"type": "record",
diff --git a/avro/src/serde/deser_schema/mod.rs
b/avro/src/serde/deser_schema/mod.rs
index 0b64de3..784f4d2 100644
--- a/avro/src/serde/deser_schema/mod.rs
+++ b/avro/src/serde/deser_schema/mod.rs
@@ -817,7 +817,7 @@ mod tests {
}
#[test]
- fn avro_rs_xxx_decode_enum_invalid_data() -> TestResult {
+ fn avro_rs_512_decode_enum_invalid_data() -> TestResult {
#[derive(Debug, Serialize, Deserialize, Clone, PartialEq)]
#[serde(rename_all = "SCREAMING_SNAKE_CASE")]
pub enum SourceType {
@@ -861,7 +861,7 @@ mod tests {
}
#[test]
- fn avro_rs_xxx_nested_struct() -> TestResult {
+ fn avro_rs_512_nested_struct() -> TestResult {
#[derive(Debug, Deserialize, Serialize, Clone, PartialEq, Eq)]
struct Test {
a: i64,
@@ -931,7 +931,7 @@ mod tests {
}
#[test]
- fn avro_rs_xxx_external_unit_enum() -> TestResult {
+ fn avro_rs_512_external_unit_enum() -> TestResult {
#[derive(Debug, Serialize, Deserialize, Clone, PartialEq)]
pub enum UnitExternalEnum {
Val1,
@@ -996,7 +996,7 @@ mod tests {
}
#[test]
- fn avro_rs_xxx_internal_unit_enum() -> TestResult {
+ fn avro_rs_512_internal_unit_enum() -> TestResult {
#[derive(Debug, Serialize, Deserialize, Clone, PartialEq)]
#[serde(tag = "t")]
pub enum UnitInternalEnum {
@@ -1040,7 +1040,7 @@ mod tests {
}
#[test]
- fn avro_rs_xxx_adjacent_unit_enum() -> TestResult {
+ fn avro_rs_512_adjacent_unit_enum() -> TestResult {
#[derive(Debug, Serialize, Deserialize, Clone, PartialEq)]
#[serde(tag = "t", content = "v")]
pub enum UnitAdjacentEnum {
@@ -1095,7 +1095,7 @@ mod tests {
}
#[test]
- fn avro_rs_xxx_untagged_unit_enum() -> TestResult {
+ fn avro_rs_512_untagged_unit_enum() -> TestResult {
#[derive(Debug, Serialize, Deserialize, Clone, PartialEq)]
#[serde(untagged)]
pub enum UnitUntaggedEnum {
@@ -1143,7 +1143,7 @@ mod tests {
}
#[test]
- fn avro_rs_xxx_mixed_enum() -> TestResult {
+ fn avro_rs_512_mixed_enum() -> TestResult {
#[derive(Debug, Deserialize, Serialize, Clone, PartialEq)]
struct TestNullExternalEnum {
a: NullExternalEnum,
@@ -1227,7 +1227,7 @@ mod tests {
}
#[test]
- fn avro_rs_xxx_single_value_enum() -> TestResult {
+ fn avro_rs_512_single_value_enum() -> TestResult {
#[derive(Debug, Serialize, Deserialize, Clone, PartialEq)]
struct TestSingleValueExternalEnum {
a: SingleValueExternalEnum,
@@ -1296,7 +1296,7 @@ mod tests {
}
#[test]
- fn avro_rs_xxx_struct_enum() -> TestResult {
+ fn avro_rs_512_struct_enum() -> TestResult {
#[derive(Debug, Serialize, Deserialize, Clone, PartialEq)]
struct TestStructExternalEnum {
a: StructExternalEnum,
@@ -1364,7 +1364,7 @@ mod tests {
}
#[test]
- fn avro_rs_xxx_struct_flatten() -> TestResult {
+ fn avro_rs_512_struct_flatten() -> TestResult {
#[derive(Debug, Serialize, Deserialize, Clone, PartialEq)]
struct S1 {
f1: String,
@@ -1407,7 +1407,7 @@ mod tests {
}
#[test]
- fn avro_rs_xxx_tuple_enum() -> TestResult {
+ fn avro_rs_512_tuple_enum() -> TestResult {
#[derive(Debug, Serialize, Deserialize, Clone, PartialEq)]
struct TestTupleExternalEnum {
a: TupleExternalEnum,
@@ -1479,7 +1479,7 @@ mod tests {
}
#[test]
- fn avro_rs_xxx_date() -> TestResult {
+ fn avro_rs_512_date() -> TestResult {
let schema = Schema::Date;
assert_roundtrip(1i32, &schema, Vec::new())?;
@@ -1487,7 +1487,7 @@ mod tests {
}
#[test]
- fn avro_rs_xxx_time_millis() -> TestResult {
+ fn avro_rs_512_time_millis() -> TestResult {
let schema = Schema::TimeMillis;
assert_roundtrip(1i32, &schema, Vec::new())?;
@@ -1495,7 +1495,7 @@ mod tests {
}
#[test]
- fn avro_rs_xxx_time_micros() -> TestResult {
+ fn avro_rs_512_time_micros() -> TestResult {
let schema = Schema::TimeMicros;
assert_roundtrip(1i64, &schema, Vec::new())?;
@@ -1503,7 +1503,7 @@ mod tests {
}
#[test]
- fn avro_rs_xxx_timestamp_millis() -> TestResult {
+ fn avro_rs_512_timestamp_millis() -> TestResult {
let schema = Schema::TimestampMillis;
assert_roundtrip(1i64, &schema, Vec::new())?;
@@ -1511,7 +1511,7 @@ mod tests {
}
#[test]
- fn avro_rs_xxx_timestamp_micros() -> TestResult {
+ fn avro_rs_512_timestamp_micros() -> TestResult {
let schema = Schema::TimestampMicros;
assert_roundtrip(1i64, &schema, Vec::new())?;
@@ -1551,7 +1551,7 @@ mod tests {
}
#[test]
- fn avro_rs_xxx_uuid() -> TestResult {
+ fn avro_rs_512_uuid() -> TestResult {
let schema = Schema::parse_str(
r#"{
"type": "fixed",
diff --git a/avro/src/serde/ser_schema/record/field_default.rs
b/avro/src/serde/ser_schema/record/field_default.rs
index 55dc459..674f782 100644
--- a/avro/src/serde/ser_schema/record/field_default.rs
+++ b/avro/src/serde/ser_schema/record/field_default.rs
@@ -1,3 +1,20 @@
+// Licensed to the Apache Software Foundation (ASF) under one
+// or more contributor license agreements. See the NOTICE file
+// distributed with this work for additional information
+// regarding copyright ownership. The ASF licenses this file
+// to you under the Apache License, Version 2.0 (the
+// "License"); you may not use this file except in compliance
+// with the License. You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing,
+// software distributed under the License is distributed on an
+// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+// KIND, either express or implied. See the License for the
+// specific language governing permissions and limitations
+// under the License.
+
use serde::{Serialize, Serializer, ser::Error};
use serde_json::Value;
diff --git a/licenserc.toml b/licenserc.toml
index 7ef9fe6..30c52e6 100644
--- a/licenserc.toml
+++ b/licenserc.toml
@@ -22,5 +22,6 @@ excludes = [
"*.avro",
"NOTICE",
"README.tpl",
- ".requirements-precommit.txt"
+ ".requirements-precommit.txt",
+ "*.proptest-regressions"
]