From b8a35fdeae2a43a706093a803a204a7b067edd3d Mon Sep 17 00:00:00 2001 From: Looly Date: Thu, 24 Jun 2021 08:03:18 +0800 Subject: [PATCH] add test --- .../src/test/java/cn/hutool/core/convert/ConvertTest.java | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/hutool-core/src/test/java/cn/hutool/core/convert/ConvertTest.java b/hutool-core/src/test/java/cn/hutool/core/convert/ConvertTest.java index 0157610e2..022e0ef68 100644 --- a/hutool-core/src/test/java/cn/hutool/core/convert/ConvertTest.java +++ b/hutool-core/src/test/java/cn/hutool/core/convert/ConvertTest.java @@ -304,4 +304,10 @@ public class ConvertTest { // 默认转换失败报错而不是返回null Convert.convert(Date.class, "aaaa"); } + + @Test + public void toDateTest2(){ + final Date date = Convert.toDate("2021-01"); + Assert.assertNull(date); + } }