From 3ad6e71f53a87215fb5286bcf87de15524699561 Mon Sep 17 00:00:00 2001 From: David Tolnay Date: Sun, 12 Nov 2017 17:26:09 -0800 Subject: Move tests into their own crate --- test-suite/tests/invalid-misc.rs | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 test-suite/tests/invalid-misc.rs (limited to 'test-suite/tests/invalid-misc.rs') diff --git a/test-suite/tests/invalid-misc.rs b/test-suite/tests/invalid-misc.rs new file mode 100644 index 0000000..bb70b97 --- /dev/null +++ b/test-suite/tests/invalid-misc.rs @@ -0,0 +1,17 @@ +extern crate toml; + +#[test] +fn bad() { + fn bad(s: &str) { + assert!(s.parse::().is_err()); + } + + bad("a = 01"); + bad("a = 1__1"); + bad("a = 1_"); + bad("''"); + bad("a = nan"); + bad("a = -inf"); + bad("a = inf"); + bad("a = 9e99999"); +} -- cgit v1.2.3