Make tests compile for rustc 1.17.0-nightly (be760566c 2017-02-28)

This commit is contained in:
Enrico Schmitz 2017-03-01 14:33:17 +01:00 committed by Enrico Schmitz
parent a1dc49c51b
commit 887a3c184e

View file

@ -45,9 +45,9 @@ fn check(expect: Constant, expr: &Expr) {
const TRUE: Constant = Constant::Bool(true);
const FALSE: Constant = Constant::Bool(false);
const ZERO: Constant = Constant::Int(ConstInt::Infer(0));
const ONE: Constant = Constant::Int(ConstInt::Infer(1));
const TWO: Constant = Constant::Int(ConstInt::Infer(2));
const ZERO: Constant = Constant::Int(ConstInt::U8(0));
const ONE: Constant = Constant::Int(ConstInt::U8(1));
const TWO: Constant = Constant::Int(ConstInt::U8(2));
#[test]
fn test_lit() {
@ -93,7 +93,7 @@ fn test_ops() {
// for transitivity
assert_eq!(half32, half64);
assert_eq!(Constant::Int(ConstInt::Infer(0)), Constant::Int(ConstInt::U8(0)));
assert_eq!(Constant::Int(ConstInt::Infer(0)), Constant::Int(ConstInt::I8(0)));
assert_eq!(Constant::Int(ConstInt::InferSigned(-1)), Constant::Int(ConstInt::I8(-1)));
assert_eq!(Constant::Int(ConstInt::U8(0)), Constant::Int(ConstInt::U8(0)));
assert_eq!(Constant::Int(ConstInt::U8(0)), Constant::Int(ConstInt::I8(0)));
assert_eq!(Constant::Int(ConstInt::I8(-1)), Constant::Int(ConstInt::I8(-1)));
}