From 14d424e573cacc8114f48ff6731e7f503e24589f Mon Sep 17 00:00:00 2001 From: "moandji.ezana" Date: Sun, 3 Aug 2014 14:24:31 +0200 Subject: [PATCH] Added failing test on invalid number --- src/test/java/com/moandjiezana/toml/TomlTest.java | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/test/java/com/moandjiezana/toml/TomlTest.java b/src/test/java/com/moandjiezana/toml/TomlTest.java index 170b0ef..58c49a4 100644 --- a/src/test/java/com/moandjiezana/toml/TomlTest.java +++ b/src/test/java/com/moandjiezana/toml/TomlTest.java @@ -261,7 +261,7 @@ public class TomlTest { } @Test(expected = IllegalStateException.class) - public void should_fail_on_invalid_date() throws Exception { + public void should_fail_on_non_existant_date() throws Exception { new Toml().parse("d = 2012-13-01T15:00:00Z"); } @@ -280,6 +280,11 @@ public class TomlTest { new Toml().parse("[a]\nb=1\n[a]\nc=2"); } + @Test(expected = IllegalStateException.class) + public void should_fail_on_invalid_number() throws Exception { + new Toml().parse("a = 200-"); + } + @Ignore @Test(expected = IllegalStateException.class) public void should_fail_when_illegal_characters_after_table() throws Exception {