update tests to pass with new compiler

This commit is contained in:
Ty Overby 2014-11-20 12:08:47 -08:00
parent 35941be66d
commit 4c6006dfb0
3 changed files with 13 additions and 11 deletions

View File

@ -5,4 +5,7 @@ authors = ["Ty Overby <ty@pre-alpha.com>"]
repository = "https://github.com/TyOverby/bincode"
documentation = "http://tyoverby.github.io/bincode/bincode/"
keywords = ["binary", "encode", "decode", "encoder", "decoder"]
keywords = ["binary", "encode", "decode", "serialize", "deserialize"]
license = "MIT"
description = "A binary serialization / deserialization strategy and implementation."

View File

@ -2,8 +2,6 @@
#![crate_type = "rlib"]
#![crate_type = "dylib"]
#![feature(struct_variant)]
extern crate serialize;
use std::io::Buffer;

View File

@ -117,9 +117,9 @@ fn enm() {
OneArg(uint),
AnotherNoArg
}
the_same(NoArg);
the_same(OneArg(4));
the_same(AnotherNoArg);
the_same(TestEnum::NoArg);
the_same(TestEnum::OneArg(4));
the_same(TestEnum::AnotherNoArg);
}
@ -132,11 +132,12 @@ fn struct_enum() {
AnotherNoArg,
StructLike{x: uint, y: f32}
}
the_same(NoArg);
the_same(OneArg(4));
the_same(AnotherNoArg);
the_same(StructLike{x: 4, y: 3.14159});
the_same(vec![NoArg, OneArg(5), AnotherNoArg, StructLike{x: 4, y:1.4}]);
the_same(TestEnum::NoArg);
the_same(TestEnum::OneArg(4));
the_same(TestEnum::AnotherNoArg);
the_same(TestEnum::StructLike{x: 4, y: 3.14159});
the_same(vec![TestEnum::NoArg, TestEnum::OneArg(5), TestEnum::AnotherNoArg,
TestEnum::StructLike{x: 4, y:1.4}]);
}
#[test]