From 131f11a6e55cbd942a49ebdec3305ba53edaf333 Mon Sep 17 00:00:00 2001 From: Seiichi Uchida Date: Sat, 27 Oct 2018 11:22:18 +0900 Subject: [PATCH] Add a test for #3139 --- tests/source/type.rs | 8 ++++++++ tests/target/type.rs | 8 ++++++++ 2 files changed, 16 insertions(+) diff --git a/tests/source/type.rs b/tests/source/type.rs index 2c2c32e7602..208a30e634e 100644 --- a/tests/source/type.rs +++ b/tests/source/type.rs @@ -121,3 +121,11 @@ fn issue3117() { } } } + +// #3139 +fn issue3139() { + assert_eq!( + to_json_value(&None :: ).unwrap(), + json!( { "test": None :: } ) + ); +} diff --git a/tests/target/type.rs b/tests/target/type.rs index d0d1543e10a..b8f41218f41 100644 --- a/tests/target/type.rs +++ b/tests/target/type.rs @@ -120,3 +120,11 @@ fn issue3117() { } } } + +// #3139 +fn issue3139() { + assert_eq!( + to_json_value(&None::).unwrap(), + json!({ "test": None:: }) + ); +}