dealing with fallout to the tests, in particular diffs between 32- vs 64-bit targets.

See also #23926.
This commit is contained in:
Felix S. Klock II 2015-04-01 02:51:45 +02:00
parent 2243a2cced
commit 2a9de1d989
3 changed files with 18 additions and 10 deletions

View File

@ -13,6 +13,12 @@
//
// This test is checking the count in an array expression.
// FIXME (#23926): the error output is not consistent between a
// self-hosted and a cross-compiled setup; therefore resorting to
// error-pattern for now.
// error-pattern: expected constant integer for repeat count, but attempted to add with overflow
#![allow(unused_imports)]
use std::fmt;
@ -22,8 +28,6 @@ use std::{u8, u16, u32, u64, usize};
const A_I8_I
: [u32; (i8::MAX as usize) + 1]
= [0; (i8::MAX + 1) as usize];
//~^ ERROR mismatched types
//~| ERROR expected constant integer for repeat count, but attempted to add with overflow
fn main() {
foo(&A_I8_I[..]);

View File

@ -17,6 +17,12 @@
// types for the left- and right-hand sides of the addition do not
// match (as well as overflow).
// FIXME (#23926): the error output is not consistent between a
// self-hosted and a cross-compiled setup; therefore resorting to
// error-pattern for now.
// error-pattern: mismatched types
#![allow(unused_imports)]
use std::fmt;
@ -26,11 +32,6 @@ use std::{u8, u16, u32, u64, usize};
const A_I8_I
: [u32; (i8::MAX as usize) + 1]
= [0; (i8::MAX + 1u8) as usize];
//~^ ERROR mismatched types
//~| ERROR mismatched types
//~| ERROR expected constant integer for repeat count, but attempted to add with overflow
//~| ERROR the trait `core::ops::Add<u8>` is not implemented for the type `i8`
//~| ERROR the trait `core::ops::Add<u8>` is not implemented for the type `i8`
fn main() {
foo(&A_I8_I[..]);

View File

@ -8,11 +8,14 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
// FIXME (#23926): the error output is not consistent between a
// self-hosted and a cross-compiled setup. Skipping for now.
// ignore-test FIXME(#23926)
#![allow(exceeding_bitshifts)]
fn main() {
let fat : [u8; (1<<61)+(1<<31)] =
//~^ ERROR array length constant evaluation error: attempted left shift with overflow
let _fat : [u8; (1<<61)+(1<<31)] =
[0; (1u64<<61) as usize +(1u64<<31) as usize];
//~^ ERROR expected constant integer for repeat count, but attempted left shift with overflow
}