From 948a17ed1d61de822a7d06527ca88b1ff709f945 Mon Sep 17 00:00:00 2001 From: Michał Krasnoborski Date: Tue, 24 Feb 2015 02:40:32 +0100 Subject: Stop parsing "-" as integer, fixes #22745 --- src/libcoretest/num/mod.rs | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src/libcoretest') diff --git a/src/libcoretest/num/mod.rs b/src/libcoretest/num/mod.rs index 2c6efc0040f..1199fd01068 100644 --- a/src/libcoretest/num/mod.rs +++ b/src/libcoretest/num/mod.rs @@ -122,4 +122,9 @@ mod test { assert_eq!("-9223372036854775808".parse::().ok(), Some(i64_val)); assert_eq!("-9223372036854775809".parse::().ok(), None); } + + #[test] + test_int_from_minus_sign() { + assert_eq!("-".parse::().ok(), None); + } } -- cgit 1.4.1-3-g733a5 From a9f6f4b73e838e83538d4544141d8354b4633aed Mon Sep 17 00:00:00 2001 From: Michał Krasnoborski Date: Tue, 24 Feb 2015 08:24:42 +0100 Subject: Add missing `fn` --- src/libcoretest/num/mod.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/libcoretest') diff --git a/src/libcoretest/num/mod.rs b/src/libcoretest/num/mod.rs index 1199fd01068..03f6e51a349 100644 --- a/src/libcoretest/num/mod.rs +++ b/src/libcoretest/num/mod.rs @@ -124,7 +124,7 @@ mod test { } #[test] - test_int_from_minus_sign() { + fn test_int_from_minus_sign() { assert_eq!("-".parse::().ok(), None); } } -- cgit 1.4.1-3-g733a5