You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@avro.apache.org by mg...@apache.org on 2022/04/18 19:00:04 UTC

[avro] branch master updated: AVRO-3494: Rust: uncomment some tests which actually pass

This is an automated email from the ASF dual-hosted git repository.

mgrigorov pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/avro.git


The following commit(s) were added to refs/heads/master by this push:
     new fc6cf1ede AVRO-3494: Rust: uncomment some tests which actually pass
fc6cf1ede is described below

commit fc6cf1ede40735f55a8c0d95e5699524676143ae
Author: Martin Tzvetanov Grigorov <mg...@apache.org>
AuthorDate: Mon Apr 18 21:59:21 2022 +0300

    AVRO-3494: Rust: uncomment some tests which actually pass
    
    Signed-off-by: Martin Tzvetanov Grigorov <mg...@apache.org>
---
 lang/rust/avro/tests/schema.rs | 41 ++++++++++++++++-------------------------
 1 file changed, 16 insertions(+), 25 deletions(-)

diff --git a/lang/rust/avro/tests/schema.rs b/lang/rust/avro/tests/schema.rs
index 292d0aaa6..1410424ba 100644
--- a/lang/rust/avro/tests/schema.rs
+++ b/lang/rust/avro/tests/schema.rs
@@ -150,18 +150,14 @@ const RECORD_EXAMPLES: &[(&str, bool)] = &[
             }"#,
         true,
     ),
-    /*
-    // TODO: (#91) figure out why "type": "error" seems to be valid (search in spec) and uncomment
     (
         r#"{
             "type": "error",
             "name": "Test",
             "fields": [{"name": "f", "type": "long"}]
         }"#,
-        true
+        false,
     ),
-    */
-    /*
     // TODO: (#92) properly support recursive types and uncomment
     (
         r#"{
@@ -172,7 +168,7 @@ const RECORD_EXAMPLES: &[(&str, bool)] = &[
                 {"name": "children", "type": {"type": "array", "items": "Node"}}
             ]
         }"#,
-        true
+        true,
     ),
     (
         r#"{
@@ -195,7 +191,7 @@ const RECORD_EXAMPLES: &[(&str, bool)] = &[
                 }
             ]
         }"#,
-        true
+        true,
     ),
     (
         r#"{
@@ -208,9 +204,9 @@ const RECORD_EXAMPLES: &[(&str, bool)] = &[
                 {"name": "serverHash", "type": "MD5"},
                 {"name": "meta", "type": ["null", {"type": "map", "values": "bytes"}]}
             ]
-        }"#, true
+        }"#,
+        true,
     ),
-    */
     (
         r#"{
                 "type":"record",
@@ -262,9 +258,6 @@ const RECORD_EXAMPLES: &[(&str, bool)] = &[
             }"#,
         true,
     ),
-    /*
-    // TODO: (#95) support same types but with different names in unions and uncomment (below the explanation)
-
     // Unions may not contain more than one schema with the same type, except for the named
     // types record, fixed and enum. For example, unions containing two array types or two map
     // types are not permitted, but two types with different names are permitted.
@@ -283,9 +276,8 @@ const RECORD_EXAMPLES: &[(&str, bool)] = &[
                 }
             ]
         }"#,
-        true
+        true,
     ),
-    */
     (
         r#"{
                 "type": "record",
@@ -376,8 +368,7 @@ const OTHER_ATTRIBUTES_EXAMPLES: &[(&str, bool)] = &[
 ];
 
 const DECIMAL_LOGICAL_TYPE: &[(&str, bool)] = &[
-    /*
-    // TODO: (#93) support logical types and uncomment
+  /*
     (
         r#"{
             "type": "fixed",
@@ -387,7 +378,7 @@ const DECIMAL_LOGICAL_TYPE: &[(&str, bool)] = &[
             "size": 10,
             "scale": 2
         }"#,
-        true
+        true,
     ),
     (
         r#"{
@@ -396,7 +387,7 @@ const DECIMAL_LOGICAL_TYPE: &[(&str, bool)] = &[
             "precision": 4,
             "scale": 2
         }"#,
-        true
+        true,
     ),
     (
         r#"{
@@ -405,7 +396,7 @@ const DECIMAL_LOGICAL_TYPE: &[(&str, bool)] = &[
             "precision": 2,
             "scale": -2
         }"#,
-        false
+        false,
     ),
     (
         r#"{
@@ -414,7 +405,7 @@ const DECIMAL_LOGICAL_TYPE: &[(&str, bool)] = &[
             "precision": -2,
             "scale": 2
         }"#,
-        false
+        false,
     ),
     (
         r#"{
@@ -423,7 +414,7 @@ const DECIMAL_LOGICAL_TYPE: &[(&str, bool)] = &[
             "precision": 2,
             "scale": 3
         }"#,
-        false
+        false,
     ),
     (
         r#"{
@@ -434,7 +425,7 @@ const DECIMAL_LOGICAL_TYPE: &[(&str, bool)] = &[
             "scale": 2,
             "size": 5
         }"#,
-        false
+        false,
     ),
     (
         r#"{
@@ -445,7 +436,7 @@ const DECIMAL_LOGICAL_TYPE: &[(&str, bool)] = &[
             "scale": 3,
             "size": 2
         }"#,
-        false
+        false,
     ),
     (
         r#"{
@@ -456,9 +447,9 @@ const DECIMAL_LOGICAL_TYPE: &[(&str, bool)] = &[
             "scale": 2,
             "size": -2
         }"#,
-        false
+        false,
     ),
-    */
+   */
 ];
 
 const DECIMAL_LOGICAL_TYPE_ATTRIBUTES: &[(&str, bool)] = &[