about summary refs log tree commit diff
diff options
context:
space:
mode:
authorSimonas Kazlauskas <git@kazlauskas.me>2016-08-24 22:38:14 +0300
committerest31 <MTest31@outlook.com>2016-12-30 15:17:26 +0100
commitdb2527add3a9442266e7d31a218b91cda255bd4a (patch)
treefc6317ce44940325f19404bb115003f252da77dd
parentd9eb756cbfdd0f4388bb7bd203d8d43761ff7942 (diff)
downloadrust-db2527add3a9442266e7d31a218b91cda255bd4a.tar.gz
rust-db2527add3a9442266e7d31a218b91cda255bd4a.zip
Fix parse-fail and compile-fail tests
-rw-r--r--src/test/compile-fail/const-tup-index-span.rs2
-rw-r--r--src/test/compile-fail/oversized-literal.rs13
-rw-r--r--src/test/parse-fail/int-literal-too-large-span.rs4
-rw-r--r--src/test/parse-fail/issue-5544-a.rs2
-rw-r--r--src/test/parse-fail/issue-5544-b.rs2
-rw-r--r--src/test/parse-fail/lex-bad-numeric-literals.rs4
6 files changed, 7 insertions, 20 deletions
diff --git a/src/test/compile-fail/const-tup-index-span.rs b/src/test/compile-fail/const-tup-index-span.rs
index 8f7ec9de58a..f3fb92e2b22 100644
--- a/src/test/compile-fail/const-tup-index-span.rs
+++ b/src/test/compile-fail/const-tup-index-span.rs
@@ -10,7 +10,7 @@
 
 // Test spans of errors
 
-const TUP: (usize,) = 5 << 64;
+const TUP: (usize,) = 5usize << 64;
 //~^ ERROR E0080
 //~| attempt to shift left with overflow
 const ARR: [i32; TUP.0] = [];
diff --git a/src/test/compile-fail/oversized-literal.rs b/src/test/compile-fail/oversized-literal.rs
deleted file mode 100644
index 5416bcacf3d..00000000000
--- a/src/test/compile-fail/oversized-literal.rs
+++ /dev/null
@@ -1,13 +0,0 @@
-// Copyright 2012 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-fn main() {
-    println!("{}", 18446744073709551616u64);  //~ error: int literal is too large
-}
diff --git a/src/test/parse-fail/int-literal-too-large-span.rs b/src/test/parse-fail/int-literal-too-large-span.rs
index c4b25d43579..1af8df7d2f6 100644
--- a/src/test/parse-fail/int-literal-too-large-span.rs
+++ b/src/test/parse-fail/int-literal-too-large-span.rs
@@ -13,7 +13,7 @@
 // issue #17123
 
 fn main() {
-    100000000000000000000000000000000 //~ ERROR int literal is too large
-
+    9999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999
+    //~^ ERROR int literal is too large
         ; // the span shouldn't point to this.
 }
diff --git a/src/test/parse-fail/issue-5544-a.rs b/src/test/parse-fail/issue-5544-a.rs
index f406b2cc803..cf1500e34d8 100644
--- a/src/test/parse-fail/issue-5544-a.rs
+++ b/src/test/parse-fail/issue-5544-a.rs
@@ -11,6 +11,6 @@
 // compile-flags: -Z parse-only
 
 fn main() {
-    let __isize = 18446744073709551616; // 2^64
+    let __isize = 340282366920938463463374607431768211456; // 2^128
     //~^ ERROR int literal is too large
 }
diff --git a/src/test/parse-fail/issue-5544-b.rs b/src/test/parse-fail/issue-5544-b.rs
index 898b0920645..8c0b6741cb8 100644
--- a/src/test/parse-fail/issue-5544-b.rs
+++ b/src/test/parse-fail/issue-5544-b.rs
@@ -11,6 +11,6 @@
 // compile-flags: -Z parse-only
 
 fn main() {
-    let __isize = 0xff_ffff_ffff_ffff_ffff;
+    let __isize = 0xffff_ffff_ffff_ffff_ffff_ffff_ffff_ffff_ff;
     //~^ ERROR int literal is too large
 }
diff --git a/src/test/parse-fail/lex-bad-numeric-literals.rs b/src/test/parse-fail/lex-bad-numeric-literals.rs
index bb97b037a00..d495a8edd09 100644
--- a/src/test/parse-fail/lex-bad-numeric-literals.rs
+++ b/src/test/parse-fail/lex-bad-numeric-literals.rs
@@ -23,8 +23,8 @@ fn main() {
     0o; //~ ERROR: no valid digits
     1e+; //~ ERROR: expected at least one digit in exponent
     0x539.0; //~ ERROR: hexadecimal float literal is not supported
-    99999999999999999999999999999999; //~ ERROR: int literal is too large
-    99999999999999999999999999999999; //~ ERROR: int literal is too large
+    9900000000000000000000000000999999999999999999999999999999; //~ ERROR: int literal is too large
+    9900000000000000000000000000999999999999999999999999999999; //~ ERROR: int literal is too large
     0x; //~ ERROR: no valid digits
     0xu32; //~ ERROR: no valid digits
     0ou32; //~ ERROR: no valid digits